0

Can anyone help me with this challenge???

Provide a query that lists the titles and prices (in that order) of the books that cost less than 20 after 5 has been subtracted from their price; that is, their price is decreased by 5, and if the price then is under 20, the book is included in the listing. Data tables are : author ,book, publisher, stock ------------------------------------------------------- SELECT title , (price -5) AS title FROM book WHERE price <20 ----------------------------------------------------- ********************************************** MY result title price ------------------------------------------- How Computers Work | 11.8 ----------------------------------------- Let's Play Poker and Chess | 5.5 ----------------------------------------- The Crime that never was | 1.4 -------------------------------------- Learn to Knit | 5.2 ****************************************** '''''''''''''''''''''''''''''''''''' Expected result ''''''''''''''''''''''''''''''''''''' title price ---------------------------------------- Three Bearded Men and the Sea 21.8 --------------------------------------------- The Ghost of the Moor 23.1 ----------------------------------------- How Computers Work 16.8 ------------------------------------------- Let's Play Poker and Chess! 10.5 ------------------------------------------ Upside-r children's stories 20.8 ---------------------------------------------- The Crime that never was 16.4 Learn to Knit 10.2

10th Nov 2021, 10:36 AM
AsentjaX👨🏾‍💻
5 Respostas
+ 2
SELECT title, price FROM book WHERE price - 5 < 20
14th Nov 2021, 12:01 AM
Monica Garcia
Monica Garcia - avatar
+ 2
thank you very much #Monica Garcia
22nd Nov 2021, 2:28 PM
AsentjaX👨🏾‍💻
+ 1
select titles, (prices - 5)as "new_prices" from book where new_prices < 20
10th Nov 2021, 11:43 AM
Muhammad Galhoum
Muhammad Galhoum - avatar
0
SELECT title , (price -5) AS title FROM book WHERE price<20 ;
10th Nov 2021, 12:30 PM
Jasy Fabiano
Jasy Fabiano - avatar
0
The statement produced wrong result
10th Nov 2021, 3:53 PM
AsentjaX👨🏾‍💻