So im creating a integration script, but for some reason its not showing the exprected result. My query is
SELECT xf_user_group_relation.user_id, xf_user_gro
Try changing the GROUP BY to
GROUP BY
xf_user_group_relation.user_id, xf_user_group_relation.user_group_id
Most other DBMS would throw an error for that query because every column in the SELECT list must be either aggregated or in the GROUP BY.
Edit: this is a great example of why ANSI-SQL and other RDBMS do not allow this syntax