+ 2
The cake problem at the end of the Basic Concepts in SQL needs a fix
Hi, I'm trying to do the cake problem at the end of the first chapter of SQL and even though my entry is: SELECT * FROM cakes ORDER BY calories LIMIT 3; The system marks this answer as wrong and shows the following: Input No Input Your Output name,calories opera cake,90 sponge cake,100 apple cake,100 Expected Output name,calories Opera Cake,90 Sponge Cake,100 Apple Cake,100 Even though both answers are the same, I think the system is case sensitive and I don't know how to Capitalize my answer
5 Respuestas
+ 3
SELECT initCap(name) as name ...
initCap convert opera cake to Opera Cake
+ 4
I think we can consider this a bug in the test data. I have reported it via in-app feedback, we can only hope SL fix it at some point. There is no simple way to convert the string to Title Case, certainly not beginner level.
+ 1
Try writing it on a single line? maybe?
SELECT * FROM cakes
ORDER BY calories
LIMIT 3;
+ 1
Thank you Krzysztof, that'll do the trick. However, they didn't teach that in any of the lessons. The exercise is supposed to be solved with the tools given until that moment. Oh well, thank you again