Hi
I need to do an SQL that count the number of elements in a table, and if it isn't there it shoul say 0
ex on the sql I using now
the result is
And should be
Hope someone can help
/LHG
I need to do an SQL that count the number of elements in a table, and if it isn't there it shoul say 0
ex on the sql I using now
Code:
SELECT phd_id, count(*) Count
FROM q3
WHERE dvc_trx_sts_cd = 'PE'
and phd_id in ('ABMSR01','KDHLR01','KDHLR02')
GROUP BY phd_id;
the result is
phd_id count
ABMSR01 1433
And should be
phd_id count
ABMSR01 1433
KDHLR01 0
KDHLR02 0
Hope someone can help
/LHG