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

Added the matchid in the groupby to align with the orderby #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jugalpanchal
Copy link

Error:
There are two errors:

  1. Column "goal.matchid" is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause.
  2. ORDER BY items must appear in the select list if SELECT DISTINCT is specified.

Solution:
Added the matchid in the groupby to align with the orderby
Distinct is not required

Validation:
Tested over the SQLZoo and validated the result.

There are two errors:
Column "goal.matchid" is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause.
ORDER BY items must appear in the select list if SELECT DISTINCT is specified.

So added the matchid in the groupby to align with the orderby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant