- 20

SELECT * FROM apartments WHERE price>AvG(price) and status="Not rented".this is apartment project query .plz look what is wrong

6th Feb 2021, 2:26 PM
prayag bhimani
prayag bhimani - avatar
39 Réponses
+ 34
SELECT * FROM Apartments WHERE price >= (SELECT AVG(price) FROM Apartments ) ORDER BY price; This working😄
6th Feb 2021, 2:32 PM
Սոֆի
+ 12
Guess it is ignoring the "not rented" statement in the coding.
16th Feb 2021, 12:51 AM
Sam Potel
Sam Potel - avatar
+ 6
Select * From Apartments Where price>=(Select AVG (price) From Apartments) Order by price;
13th Dec 2021, 12:19 PM
Maheshwaran Janushanthan
+ 4
It’s not working
30th Apr 2021, 10:59 PM
Jazzy85
Jazzy85 - avatar
+ 4
Tricky. The rented is lower than the AVG. If you can calculate that easy enough and then work out where parenthesis go. This has owned me for a few days. It always makes sense once you see the correct syntax but everything else does until that point too lol
3rd Aug 2021, 12:03 PM
GJD
GJD - avatar
+ 3
SELECT * FROM Apartments WHERE price > ( SELECT AVG(price)FROM Apartments) and status in ('Not rented') ORDER BY price;
17th Jun 2021, 8:27 AM
Sparsh mathur
Sparsh mathur - avatar
+ 3
Answer:- select*from apartments WHERE price >= (SELECT AVG(price) FROM Apartments ) ORDER BY price
30th Sep 2021, 7:51 AM
Raj Sharma
Raj Sharma - avatar
+ 2
jajajaja This is the code. SELECT * FROM Apartments WHERE price > ( SELECT AVG(price)FROM Apartments) and status in ('Not rented') ORDER BY price; the first code i had was this and it worked, i was forgetting I could use the FUNCTION AND: SELECT * FROM Apartments WHERE price > ( SELECT AVG(price)FROM Apartments) ORDER BY price;
17th Jul 2021, 12:02 AM
Ignacio Hernandez Jimenez
Ignacio Hernandez Jimenez - avatar
+ 1
select * from apartments where price > ( select avg(price)from apartments) and status !='rented' order by price;
29th Sep 2022, 6:18 PM
Sarthak Kulkarni
Sarthak Kulkarni - avatar
+ 1
SELECT * FROM Apartments WHERE price>(select AVG(price) FROM Apartments) and status='Not rented' Order BY price Working
10th Mar 2023, 4:03 AM
CEZAR G
CEZAR G - avatar
0
Ok thank you 🔥
6th Feb 2021, 2:33 PM
prayag bhimani
prayag bhimani - avatar
0
Apartments You want to rent an apartment and have the following table named Apartments: Write a query to output the apartments whose prices are greater than the average and are also not rented, sorted by the 'Price' column. Recall the AVG keyword. SELECT id, city, address, price, status FROM Apartments WHERE price > ( SELECT AVG(price)FROM Apartments) ORDER BY price; GOOD LUCK ....ITS WORKING
16th Mar 2021, 11:47 PM
solomon clark
solomon clark - avatar
0
What is the code for this ?
27th Jun 2021, 7:59 AM
Kanchana Joshi
Kanchana Joshi - avatar
0
SELECT * FROM Apartments WHERE price >= (SELECT AVG(price) FROM Apartments) ORDER BY price;
22nd Sep 2021, 12:55 PM
Jobayrul Hasan
Jobayrul Hasan - avatar
0
select * from Apartments where price>(select AVG(price) from Apartments) order by price This one is working
30th Oct 2021, 6:28 PM
IRUKULLA BHARATH
0
A solution of this homework SELECT * FROM Apartments WHERE price >= (SELECT AVG(price) FROM Apartments ) ORDER BY price;
1st Dec 2021, 10:54 AM
Nichervan Essa Mahammad
Nichervan Essa Mahammad - avatar
0
SELECT * FROM Apartments WHERE price >= (SELECT AVG(price) FROM Apartments ) ORDER BY price;
4th Dec 2021, 5:12 PM
Saad Owais
0
SELECT * FROM Apartments WHERE price >= (SELECT AVG(price) FROM Apartments ) ORDER BY price;
26th Dec 2021, 2:17 PM
Nabila Muftia Ma'ruf Kartono
Nabila Muftia Ma'ruf Kartono - avatar
0
hi
25th Jan 2022, 10:52 PM
Saleh Mohammed
Saleh Mohammed - avatar
0
hope this can help you SELECT * FROM Apartments WHERE price >= (SELECT AVG(price) FROM Apartments ) ORDER BY price;
30th Jan 2022, 6:34 PM
Avrian Shandy
Avrian Shandy - avatar