Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group by series sometimes selects the wrong row #430

Closed
stephenharris opened this issue Jan 29, 2018 · 0 comments
Closed

Group by series sometimes selects the wrong row #430

stephenharris opened this issue Jan 29, 2018 · 0 comments
Assignees
Labels

Comments

@stephenharris
Copy link
Owner

When grouping records, the record chosen can sometimes between arbitrary. See for instance https://wp-event-organiser.com/forums/topic/wrong-date-for-next-event-showing-in-archive-group-by-series/ and https://stackoverflow.com/questions/12102200/get-records-with-max-value-for-each-group-of-grouped-sql-results

The solution as detailed in the second link is to JOIN the table with itself rather than using GROUP BY.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant