- 23
Help me in this question please (cake exercise)
A local bakery creates unique cake sets. Each cake set contains three different cakes. Here is the cakes table: Š¢oday a customer want a cake set that has minimal calories. Write a query to sort the cakes by calorie count and select the first 3 cakes from the list to offer the customer. Use limit and ORDER by I answered it : SELECT name, salary from calories ORDER by calories ASC LIMIT 3 ; But i do not know why it is wrong
16 Respostas
+ 6
SELECT*FROM Cakes
ORDER BY calories LIMIT 3;
+ 3
A local bakery creates unique cake sets. Each cake set contains three different cakes.
Š¢oday a customer want a cake set that has minimal calories.
Write a query to sort the cakes by calorie count and select the first 3 cakes from the list to offer the customer.
Ans:-
SELECT * FROM Cakes ORDER BY Calories LIMIT 3;
0
SELECT * FROM cakes ORDER BY calories LIMIT 3;
0
SELECT * FROM cakes
ORDER BY calories LIMIT 3;
0
SELECT * FROM cakes ORDER BY calories
LIMIT 3 ;
0
@RUKHSANA PRAVEEN
Can you please tell why ORDER BY is written before LIMIT?
0
Correct Answer:-
SELECT*FROM Cakes
ORDER BY calories LIMIT 3;
- 1
SELECT* FROM Cakes ORDER By calories LIMIT 3 ;
- 1
SELECT* FROM Cakes
ORDER By calories
LIMIT 3 ;
- 1
Table important give attention!
SELECT name, calories
from cakes
ORDER by calories ASC
LIMIT 3 ;
- 2
pasant Hussein
calories is a table name then how it could be use in ORDER BY?
There is table name Cakes not Calories.
SELECT * FROM Cakes ORDER BY Calories LIMIT 3;
- 2
Thanks alot š¤
- 2
Select Name,Calories from Cakes order by Calories limit 3;
- 2
SELECT* FROM Cakes ORDER By calories LIMIT 3 ;
- 2
SELECT * FROM Cakes ORDER BY Calories LIMIT 3;
- 4
SELECT* FROM Cakes ORDER By calories LIMIT 3 ;