Reply To: SQL : Distinct Count

#9000
Graham Roberts
Participant

Hi, you can use the following:

select
tran_type,
tran_status,
toolset,
base_ins_type,
ins_type,
ins_sub_type,
idx_group,
idx_subgroup,
internal_lentity,
external_portfolio,
count(deal_tracking_num) count_deal_num

from
ab_tran
where tran_type in ( 0 ) and tran_status in ( 3 , 4 , 22 ) and current_flag = 1
group by
tran_type,
tran_status,
toolset,
base_ins_type,
ins_type,
ins_sub_type,
idx_group,
idx_subgroup,
internal_lentity,
external_portfolio

Download PDF version

This field is for validation purposes and should be left unchanged.