clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 2335572 fiddles created (27418 in the last week).

-- aggregate over scalar func SELECT MAX(c) FROM (SELECT 1 AS c, 2 AS d FROM sysibmadm.env_inst_info UNION ALL SELECT 2 AS c,-1 AS d FROM sysibmadm.env_inst_info )
1
2
 hidden batch(es)


SELECT MAX(c) FROM (SELECT 1 AS c, 2 AS d FROM sysibmadm.env_inst_info UNION ALL SELECT 2 AS c,-1 AS d FROM sysibmadm.env_inst_info ) GROUP BY ()
1
2
 hidden batch(es)


SELECT MAX(MAX(c)) FROM (SELECT 1 AS c, 2 AS d FROM sysibmadm.env_inst_info UNION ALL SELECT 2 AS c,-1 AS d FROM sysibmadm.env_inst_info )
[IBM][CLI Driver][DB2/LINUXX8664] SQL0112N The operand of the column function "MAX" includes a column function, a scalar fullselect, or a subquery. SQLSTATE=42607 SQLCODE=-112
 hidden batch(es)


-- scalar func SELECT MAX(c,d) FROM (SELECT 1 AS c, 2 AS d FROM sysibmadm.env_inst_info UNION ALL SELECT 2 AS c,-1 AS d FROM sysibmadm.env_inst_info )
1
2
2
 hidden batch(es)