SQL adaptation guide for IBM DB2 UDB 10.x / 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