DB2
Wow, DB2 is old school IBM:
SQL0119N An expression starting with “LASTNAME” specified in a SELECT
clause, HAVING clause, or ORDER BY clause is not specified in the GROUP
BY clause or it is in a SELECT clause, HAVING clause, or ORDER BY clause
with a column function and no GROUP BY clause is specified. SQLSTATE=42803
I feel like I’ve been sucked back through a time warp to the era of Jurassic Computing, when mainframes ruled the earth…