Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to sum the column value based on the distinct value of other column

SELECT

NVL(SUM(WI.ROSTER_CNT), 0

) roster_cnt, territory_name



FROM WEB_TRACK_APPTS WI,(SELECT distinct WRKEVNTID FROM WEB_TRACK_APPTS WHERE CLIENTID = '03'



AND TRUNC(CRDT) >= TO_DATE('01/01/2010', 'MM/DD/YYYY'

)



AND TRUNC(CRDT) < TO_DATE(' 01/01/2011 ', 'MM/DD/YYYY'

))



group by

territory_name

I have to display the roster_cnt in my straight table along with some other counts. Here we are doing the sum based on the distinct wrkevntid.

I have the qvd file where i have taken all the values from my web_track_appts table . Now how should i give this distinct key in my expression and group by claue.

any help will be appreciated.





0 Replies