0

No output [Solved]

I tried writing the sql Apartment code but it gives me no output,where could I be wrong. Here is my code: select from apartments where price >= (select avg(price ) from apartments) and status = 'not rented'

15th Jun 2021, 10:35 PM
SHAMSO OSMAN
SHAMSO OSMAN - avatar
4 Answers
+ 3
1) you don't primarly select anything 2) price must be greater than avg (not greater or equal) 3) status value must be capitalized 4) result must be sorted by price
15th Jun 2021, 11:07 PM
visph
visph - avatar
+ 2
Thank you, Brian "Bill"
15th Jun 2021, 11:07 PM
SHAMSO OSMAN
SHAMSO OSMAN - avatar
+ 2
Ok, I'll rectify it visph
15th Jun 2021, 11:09 PM
SHAMSO OSMAN
SHAMSO OSMAN - avatar
+ 1
Almost done. I see two issues: 1. Missing the fields between select and from. 2. The text for status comparison needs to have correct capitalization.
15th Jun 2021, 11:02 PM
Brian
Brian - avatar