SQL adaptation guide For IBM DB2 UDB 8.x, 9x / Data manipulation |
Informix® allows you to use column numbers in the GROUP BY clause
SELECT ord_date, sum(ord_amount) FROM order GROUP BY 1
IBM® DB2® does not support column numbers in the GROUP BY clause.
Use column names instead:
SELECT ord_date, sum(ord_amount) FROM order GROUP BY ord_date