0

SQL - Apartments Project

I am new to SQL and recently started learnig SQL. In the module 2, there is a project named Apartments. I was trying to solve it but the result is empty. Please help me out with this. Q. Give output the apartments whose prices are greater than the average and are also not rented, sorted by the 'Price' column. Table name: Apartments Columns: id, city, address, price, status status values: 'Rented', 'Not rented' My try: SELECT * FROM Apartments WHERE Price > ( SELECT AVG(Price) FROM Apartments ) AND status = 'Not rented'; I have not yet added ORDER BY. But the output is empty. I don't know what I'm doing wrong. Please help me out with this

4th May 2021, 11:11 AM
Hanuma Ukkadapu
Hanuma Ukkadapu - avatar
2 Antworten
- 1
There is a bug in Code Coach on this task. I have reported it. See this discussion https://www.sololearn.com/Discuss/2772997/?ref=app
4th May 2021, 1:53 PM
Brian
Brian - avatar
0
Brian I am sorry. I should have searched the Q&A before posting a question. I'll delete this post. Is there a way to make it work or should we wait until the sololearn team fixes it?
4th May 2021, 2:01 PM
Hanuma Ukkadapu
Hanuma Ukkadapu - avatar