Write a query to output the apartments whose prices are greater than the average and are also not rented, sorted by the 'Price' | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 2

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

Question

22nd Feb 2022, 1:56 PM
Amit
Amit - avatar
2 Réponses
+ 2
SELECT * FROM Apartments WHERE price >= (SELECT AVG(price) FROM Apartments ) ORDER BY price;
22nd Feb 2022, 1:57 PM
Amit
Amit - avatar
+ 2
And your question is❓
22nd Feb 2022, 2:59 PM
Simba
Simba - avatar