0
SQL Apartments
Hello, I tried this query: https://pastebin.com/1AjhN55R The output is: id,city,address,price,status Where is my mistake?
9 Antworten
+ 19
Here is my code
You can try it.
It surely help you.
SELECT * FROM Apartments
WHERE price>=(SELECT AVG(price)FROM Apartments)
ORDER BY price;
+ 3
Anis Ali Khan
Problem is with SQL Compiler not your script.
https://www.sololearn.com/post/935054/?ref=app
+ 2
My code
SELECT * FROM Apartments
WHERE price > (SELECT AVG(price) FROM Apartments
AND status != ‘Rented’
ORDER BY price;
0
Happy coding
0
Most welcome 👍
0
❤️😍Prerana😍❤️ It tells you to also account for status being "Not Rented". I know it turns out that you don't need to include it but if I had to what would it look like?
- 1
thank you. I also had to delete the second subcondition.
- 1
Most welcome 👍
- 1
Thank you Sathe Prerana Satish