Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. select country,client,COUNT(DISTINCT msisdn) as 'Total_number_of_MSISDN',count(*) as 'Total_number_of_MSISDN',
  2. count(case when COUNT(DISTINCT msisdn) then 1 end )
  3. from my_table
  4. where CAST(time_updated as DATE) = CURRENT_DATE-1
  5. and action_status='COMPLETED' and "ACTION" ='CHARGE'
  6. GROUP BY country,client
  7. order BY country,client
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement