+ 1

Any assistance please?

Please guys kindly help me with all the codings for the 3 projects whilst learning the sql . I'm only left with 3 projects for my certificate. Please I need your support.

6th Jul 2023, 6:00 PM
Prince Adjei
Prince Adjei - avatar
32 Answers
+ 6
In order for us to help you we need the task description, we need to see your code attempt and we need to see what you've searched for to resolve your problem. Can you help us out? https://code.sololearn.com/Wek0V1MyIR2r/?ref=app https://code.sololearn.com/W0uW3Wks8UBk/?ref=app https://code.sololearn.com/W3uiji9X28C1/?ref=app
6th Jul 2023, 6:17 PM
Ausgrindtube
Ausgrindtube - avatar
+ 6
Prince Adjei , there are 2 issues in the code: > the statement only selects the field *calories*, but should select *name, calories* > the 3rd line ends with a semicolon *;*. this should only be used in the last line.
6th Jul 2023, 8:17 PM
Lothar
Lothar - avatar
+ 6
You are close to get the correct query and answer. Your output is different because, there is error on line 3 near *ORDER BY* keyword. Check what the task is asking you to do. As above you stated, ``` Write a query to {sort the cakes by calorie count} and select the first 3 cakes from the list to offer the customer.``` -> means rather it should be calories and not cakes.
7th Jul 2023, 3:30 AM
D Shah 🎯⏳️
D Shah 🎯⏳️ - avatar
+ 4
What is the code meant to do? Review the lesson, and see what might go under the "//your code goes here"
15th Jul 2023, 7:56 PM
Ausgrindtube
Ausgrindtube - avatar
+ 3
Prince Adjei, it might be good to review the lessons and maybe do some further research. It's no good if you aren't able to solve them mostly by yourself, otherwise you will be dependent on others for a long time. If you're still having trouble with any other task, please copy the task description and attach your code attempt.
8th Jul 2023, 7:26 AM
Ausgrindtube
Ausgrindtube - avatar
+ 2
Great news that you finished the course! I think your code is fine. The issue is that the task doesn't ask for you to write "Enter the difficulty...."
8th Jul 2023, 10:37 AM
Ausgrindtube
Ausgrindtube - avatar
+ 2
We need to see your code too. It looks like it should include an if/else section based on the contains method.
19th Jul 2023, 7:23 AM
Ausgrindtube
Ausgrindtube - avatar
+ 1
"""SELECT name,calories FROM cakes ORDER BY calories LIMIT 3;""" This one worked for me
8th Jul 2023, 3:23 AM
Prince Adjei
Prince Adjei - avatar
+ 1
You just need to think about the need behind what you're doing. Read carefully what you're asked to do and organize the ideas so that you get the correct query.
8th Jul 2023, 3:47 AM
ajap
ajap - avatar
+ 1
Thanks for your responses y'all. Cert obtained successfully
8th Jul 2023, 9:36 AM
Prince Adjei
Prince Adjei - avatar
0
SELECT calories FROM cakes ORDER BY calories; LIMIT 3;
6th Jul 2023, 7:01 PM
Prince Adjei
Prince Adjei - avatar
0
A local bakery creates unique cake sets. Each cake set contains three different cakes. Here is the cakes table:
6th Jul 2023, 7:02 PM
Prince Adjei
Prince Adjei - avatar
0
Т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.
6th Jul 2023, 7:02 PM
Prince Adjei
Prince Adjei - avatar
0
Try to combine ORDER BY and LIMIT
6th Jul 2023, 7:03 PM
Prince Adjei
Prince Adjei - avatar
0
SELECT name,calories FROM cakes ORDER BY cakes LIMIT 3; The output is not working please
6th Jul 2023, 10:51 PM
Prince Adjei
Prince Adjei - avatar
0
My output is different from the real answer
6th Jul 2023, 10:51 PM
Prince Adjei
Prince Adjei - avatar
0
I think you misunderstood what you're supposed to order with your query. What's the customer need for the cake ?
7th Jul 2023, 12:40 PM
ajap
ajap - avatar
0
It hurts me dat I can't post a screenshot of all that I mean
7th Jul 2023, 10:05 PM
Prince Adjei
Prince Adjei - avatar
0
"sort the cakes by calorie count" According to you, what is your current query doing ? Your customer doesn't want to know what the sets are, they want to know which cake sets have the less calories (more precisely the three ones that have the less calories). How would you translate that in SQL ? Which combination of keywords will give exactly what the customer wants ?
7th Jul 2023, 10:26 PM
ajap
ajap - avatar
0
Also, remember that ORDER BY takes an attribute name as argument not a table name, so you can't do "ORDER BY cakes".
7th Jul 2023, 10:32 PM
ajap
ajap - avatar