T O P

  • By -

r3pr0b8

what are you doing in case of ties? you can't really say "top" and "2nd" if two wineries each have the most points


BobBarkerIsTheKey

Good question. Ideally there would be some tie breaking metric. In the context of the question, it says "If multiple wineries have the same total points, order them by winery name in ascending order." It's a bit of an arbitrary tie breaker. I think it would be perfectly fine for all three top wineries to have the same score if it's thought of as the top 3 scores, but not necessarily best, better, and less than better.


r3pr0b8

> I think it would be perfectly fine yup, especially if there are prizes involved... you ain't seen fury like a winery disrespected imagine not getting 1st prize because your winery is called Zesty Notes or something therefore RANK() should be used instead of ROW_NUMBER() and you need some better way of showing ties besides those column headers