I ran this query in Oracle
select studentid, attndmark
from attendance_master m,
attendance_detail d
where m.attnid = d.attendid
group by studentid
and got the error:
ORA-00979: not a GROUP BY expression
The error is OK, and I know the question about the list of columns in the select clause. But a similar query is valid in MySQL.
SELECT aff.akey, username
FROM `affiliates` aff,
affstats ast
WHERE aff.akey = ast.akey
group by aff.akey
I need a query trick that can work on both Oracle / Mysql and MSSQL.
What could be the trick?
source
share