0
How can I write this code SQL
Write a query to output the apartments whose prices are greater than the average and are also not rented, sorted by the 'Price' column
3 odpowiedzi
0
Badar Adam (بدر ادم)
first get average of 'not rented' appartments then compare average with prices, if prices are greater than average then display results and results should be sorted by 'Price' column.
0
Select *
From apartments
Where price > (select Avg (price) from apartments)
And status = ‘Not rented’
Order by price;
0
Not working