- 6

Write a query to output the apartments whose prices are greater than the average and are also not rented, sorted by the 'Price'.

Write a query to output the apartments whose prices are greater than the average and are also not rented, sorted by the 'Price' column. Expected Output id,city,address,price,status 2,Marlboro,985 Huntz Lane,800,Not rented 6,Great Neck,1927 Romines Mill Road,900,Not rented 1,Las Vegas,732 Hall Street,1000,Not rented (id, name, adddress, price, status) (1, 'las vegas', '732 hall street',1000, 'not rented'), (2, 'marlboro', '985 hantz lane', 800, 'not rented'), (3, 'moretown', '3757 wines lane', 700, 'not rented'), (4, 'owatonna', '314 pritchard court', 500, 'rented'), (5, 'grayslake', '3234 cunningham court', 600, 'rented'), (6, 'great neck', '1927 romines mill road', 900, 'not rented')

14th Sep 2022, 4:05 AM
Mohit Namdev
Mohit Namdev - avatar
3 Answers
+ 2
https://code.sololearn.com/w12o4Ot5cb8V/?ref=app
19th Sep 2022, 4:05 PM
CalviŐČ
CalviŐČ - avatar
+ 1
and not or
26th Oct 2022, 11:47 AM
Mohit Namdev
Mohit Namdev - avatar