Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

DB2 :: RE: Require help in DB2 Query

$
0
0
Author: chandan.inst
Subject: Reply to: Require help in DB2 Query
Posted: Tue Aug 09, 2016 11:20 am (GMT 5.5)

is this something you are expecting?

Code:
select
Count(case when (t1.a = 1 and t1.b<> 2) then 1 else 0 end) as A_COUNT
, Count(case when (t1.b = 2 and t1.a<>1) then 1 else 0 end) as B_COUNT
from t1


Thanks,
Chandan


Viewing all articles
Browse latest Browse all 8500

Trending Articles