I need to get detailed record level data from records returned from a GROUP BY query.
In other words, get the minimum team_code values from each date, and then from those, get the opposition and kickoff values. I tried the attached code without success, but hopefully it will illustrate what I'm trying to do.
Any help much appreciated. Oh, and this will be a MySQL query.
SELECT fr_match_date, min(fr_team_code),
( SELECT fr_opposition, fr_kickoff
FROM fixtures_results XY
WHERE XY.fr_match_date = AB.fr_match_date
AND XY.fr_team_code = AB.fr_team_code
FROM fixtures_results AB
WHERE fr_season_start = 2008
AND fr_home_away = 'H'
AND fr_team_code not in ('S', 'V', 'Y')
GROUP BY fr_match_date
ORDER BY fr_match_date, fr_team_code