Monty Program AB | Feature list | About | Login | Register

Implement GROUP LIMIT and GROUP ORDER BY for easy groupwise maximum

This allows to add comments, votes, and financial commitments to a proposal. It also allows to edit the original proposal.

My idea is to allow anyone to edit the proposal, but to keep a wiki-like history of all edits (initial version would only store the revision info, in later versions we could add an interface for showing them).

Proposed by: Kristian Nielsen, Kristian Nielsen Consulting.

Idea is to implement a simple syntax for the
classical group-wise maximum problem (http://kristiannielsen.livejournal.com/7357.html).

For a single row, this is easy with ORDER BY FIELD LIMIT 1. But this does not
work for multiple rows with GROUP BY.

Idea is to implement a version of ORDER BY and a version of LIMIT that works
within each group of a GROUP BY query.

Votes: 2    Financial commit: €0

Comment by Kristian Nielsen, Kristian Nielsen Consulting:

Hm, actually I am not sure I like this proposal the best. It seems maybe
overly complex to allow the GROUP LIMIT. Maybe GROUP ORDER BY would be
sufficient, so that the MySQL extension of allowing non-aggregate fields
outside of the GROUP BY expressions could be made to deterministically select
min/max row. Or maybe a multi-column SELECT EXTREMA(field1 MAX, field2 MIN)
would be better instead.

Comment by Someone:

Another comment here...

Vote for this proposal: Very important
Important
Nice to have
Not useful
Offer payment of €
Add a comment:

User information (log in to pre-fill values from your account):

Name:
Company:
Website:
Email (will not be shown):
Phone (will not be shown):
Other contact information (will not be shown):

Optionally: log in to pre-fill user information from your account:

User name:
Password: