- 20
SELECT * FROM apartments WHERE price>AvG(price) and status="Not rented".this is apartment project query .plz look what is wrong
39 Respuestas
+ 34
SELECT * FROM Apartments
WHERE price >= (SELECT AVG(price) FROM Apartments )
ORDER BY price;
This working😄
+ 12
Guess it is ignoring the "not rented" statement in the coding.
+ 6
Select * From Apartments
Where price>=(Select AVG (price) From Apartments)
Order by price;
+ 4
It’s not working
+ 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
+ 3
SELECT * FROM Apartments
WHERE price > ( SELECT AVG(price)FROM Apartments) and status in ('Not rented')
ORDER BY price;
+ 3
Answer:-
select*from apartments
WHERE price >= (SELECT AVG(price) FROM Apartments )
ORDER BY price
+ 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;
+ 1
select * from apartments
where price > ( select avg(price)from apartments) and status !='rented' order by price;
+ 1
SELECT * FROM Apartments
WHERE price>(select AVG(price) FROM Apartments) and status='Not rented'
Order BY price
Working
0
Ok thank you 🔥
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
0
What is the code for this ?
0
SELECT * FROM Apartments WHERE price >= (SELECT AVG(price) FROM Apartments) ORDER BY price;
0
select * from Apartments where price>(select AVG(price) from Apartments) order by price
This one is working
0
A solution of this homework
SELECT * FROM Apartments
WHERE price >= (SELECT AVG(price) FROM Apartments )
ORDER BY price;
0
SELECT * FROM Apartments
WHERE price >= (SELECT AVG(price) FROM Apartments )
ORDER BY price;
0
SELECT * FROM Apartments
WHERE price >= (SELECT AVG(price) FROM Apartments )
ORDER BY price;
0
hi
0
hope this can help you
SELECT * FROM Apartments
WHERE price >= (SELECT AVG(price) FROM Apartments )
ORDER BY price;