5 ms·
Author here - I'm scrolling thru the logs and it is interesting to see that on the first question lots of people try to write "select name, total_weight" despit
by andy_boot 9y ago
Author here - I'm scrolling thru the logs and it is interesting to see that on the first question lots of people try to write "select name, total_weight" despite there only being a weight column which you have to use an aggregate on to get the total weight.
I guess I need to rethink my design a little.
- johannes_ne 9y agoIt took me a while to see the 'show schema' link. Maybe this should always be shown.
- danielbarla 9y agoI suspect there's a need to keep the design simple, but the source table schema should probably be more prominent. I suspect most people try to guess the names of the columns before they ever click "Show table schema". Nice quiz, by the way, and I like the topic. In my experience, too few devs / dbas make good use of window functions.
- jabagawee 9y agoQuick bit of feedback: question 10 refers to the "WINDOW command" which I think should be called the "WINDOW clause" to help clueless folks (ie me) Google for it.
- andy_boot 9y agogood idea. I'll fix that.
- meritt 9y agoThe vast majority of developers don't know SQL beyond simple CRUD queries. The surge in popularity of NoSQL over the past decade has made SQL become a lost art. Even when using relational databases, ORMs often alleviate the need for understanding the principles. Thank you for making this. Q6 has a flaw. You request "Order by: ranking, name" but the accepted solution sorts by rank only (Alfie should come before Ashes)
- Karlozkiller 9y agoI thought the underlying schema was pretty obvious. However I made lots of mistakes due to trying it out from my phone, and it didn't cooperate as well as one would've liked. But I think the design was good. I also noticed the option to look at the schema, if needed.
- koyote 9y agoI did that and to be honest I am not quite sure why. I think it's due to lack of reading the question properly and impatience. But it also might be due to how programmers sometimes think/work. Often, when I am trying to solve a problem I like writing something (anything) down in broad strokes first so that I can then go back in and 'fix' each smaller part of the larger problem.
- oneweekwonder 9y agoYou had me on the plural for your table names. Have not seen it in a while. Personally believe it is a preference thing.
- andy_boot 9y agoDespite being the author I think you are correct. It should be table: 'cat' not 'cats'