I 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.
The 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)
Re:Advanced SQL window function quiz
by danielbarla on Friday February 09, 2018 @02:05AM
(#16338471)
I 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.
Re:Advanced SQL window function quiz
by Karlozkiller on Friday February 09, 2018 @03:10AM
(#16338683)
I 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.
Re:Advanced SQL window function quiz
by johannes_ne on Friday February 09, 2018 @01:58AM
(#16338446)
It took me a while to see the 'show schema' link. Maybe this should always be shown.
Quick 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.
good idea. I'll fix that.
Re:Advanced SQL window function quiz
by oneweekwonder on Friday February 09, 2018 @06:48AM
(#16339495)
You had me on the plural for your table names. Have not seen it in a while. Personally believe it is a preference thing.
I guess I need to rethink my design a little.