NVL: if the first parameter is empty use the value of the second parameter NVL(,)
NVL2: If the first parameter is empty, take the second parameter value, if the first parameter is not empty, take the third parameter value
SELECT COUNT(*) count,
(SELECT NVL(MAX(SET_USER_NUM), 999999)
FROM TB_CUS_FIRM T1
WHERE CUSTOMER_KEY = 545) SET_USER_NUM
FROM TB_CUS_USER
WHERE CUSTOMER_KEY =545 AND USER_LEVEL = 1
GROUP BY CUSTOMER_KEY