9

I came across the tag when someone recently tagged a question with it, and it has a rather healthy 66 followers and 2.1k questions for what to me looks like rather an obscure tag. The Wiki says:

One of the most frequent stumpers for SQL programmers is to query rows that match the greatest (or least) value over a given group. For example, all details about the City with the largest population per state. You can't do it simply with GROUP BY because the other columns will be ambiguous.

Is there a canonical answer to this question, and if so, should there be a pointer to it in the tag wiki? This is the question using this tag, which seems to be pretty much an exact match. I'm not an SQL expert, so I don't feel qualified to suggest a solution.

(PS: I see there's also a that is much less popular and has been discussed here - perhaps I have my tags mixed up?)

5
  • Do we really need more than just a simple canon Q/A? I believe that the whole array of problems is just 1 problem with 1 solution (per implementation) and having them grouped together doesn't serve any purpose since each problem have the same solution.
    – Braiam
    Commented Oct 25, 2017 at 10:56
  • 1
    There is no one canonical answer or even group of answers within a SQL dialect (and version) let alone overall. This tag is well maintained within the sql community and should be left alone. That's not to say that some of the questions can't be consolidated but it should be done sensitively.
    – Ben
    Commented Oct 25, 2017 at 11:23
  • @Ben version is irrelevant from the Q asking perspective: any Q would be "I want to do X in whatever", answers just need to keep up being updated. SQL dialects are their own tags, with wealth of knowledge and several potential questions. A single problem doesn't deserve its own tag.
    – Braiam
    Commented Oct 25, 2017 at 11:29
  • You've focused on the aside in brackets rather than the fact that an expert had just told you that the statement behind your argument doesn't have a solid foundation @Braiam. Then, communities within SO have their own norms. Are you going to convince the Lounge to remove language-lawyer?
    – Ben
    Commented Oct 25, 2017 at 12:08
  • @Ben of course, since the lounge knows very well that their "norms" are never above SO norms.
    – Braiam
    Commented Oct 25, 2017 at 20:13

0

You must log in to answer this question.

Browse other questions tagged .