Gedankenpolizei
Cadet 4th Year
- Registriert
- März 2021
- Beiträge
- 100
Hallo,
ich bin gerade am Verzweifeln, da ich wohl einen dummen Fehler einfach nicht erkenne.
Was genau ist an meinem Code nicht richtig?
Fragestellung:
Write a query to output the apartments whose prices are greater than the average and are also not rented, sorted by the 'Price' column.
Meine Lösungen:
SELECT * FROM Apartments
WHERE price > (SELECT AVG(price) FROM Apartments)
AND status = 'Not Rented'
ORDER BY price;
SELECT * FROM Apartments
WHERE price > AVG(price)
AND status = 'Not Rented'
ORDER BY price;
ich bin gerade am Verzweifeln, da ich wohl einen dummen Fehler einfach nicht erkenne.
Was genau ist an meinem Code nicht richtig?
Fragestellung:
Write a query to output the apartments whose prices are greater than the average and are also not rented, sorted by the 'Price' column.
Meine Lösungen:
SELECT * FROM Apartments
WHERE price > (SELECT AVG(price) FROM Apartments)
AND status = 'Not Rented'
ORDER BY price;
SELECT * FROM Apartments
WHERE price > AVG(price)
AND status = 'Not Rented'
ORDER BY price;