Note that there are some explanatory texts on larger screens.

plurals
  1. USmctedo
    primarykey
    data
    text
    plurals
    1. This table or related slice is empty.
    1. COI was wondering if a team identifier could be generated, for example a function (excuse that wording) which aggregated the multiple rows which comprised a team into an identifier - in the Fiddle example above, one which aggregated into 1000/1001/1002 for example. Grouping could then be done on this aggregated identifier?
      singulars
    2. CO@MostyMostacho updated fiddle: http://www.sqlfiddle.com/#!2/0ed41 Expected result is just a list of ID numbers relating to the best times each different combination of people has achieved for a specific event - e.g. in the Fiddle example, result 2 would be shown for that team of people [1000,1001,1002] as the time they achieved was better (quicker) than the time they achieved previously. a team can be identified by them all being linked to the same result (i.e. in example) 1000,1001,1002 are a team as they competed together to form result 1 and result 2.
      singulars
    3. COwhile this does fix the problem outlined above, it introduces a new issue where if a competitor has multiple times, but they are not equal, then potentially neither is chosen as MIN(member_result.id) doesn't necessarily pick the ID which matches the minimum time. (e.g. result ID#19 time 1 second, member_result #15 member_id #2, result #24 time 0.01 seconds, member_result #19 member_id #2).
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload