mihir777
New member
- Joined
- May 28, 2016
- Messages
- 24
- Reaction score
- 0
- Points
- 1
- Excel Version(s)
- 2016
Hello,
i am using this query
SELECT count(CAMPAIGN_ID) as CAMPAIGN_ID
FROM sp_sms_view
Where CAMPAIGN_ID in (3600,3603)
Group By Campaign_id
union
SELECT count(DELIVERY_STATUS) as DELIVERY_STATUS
FROM sp_sms_view
Where CAMPAIGN_ID in (3600,3603) and DELIVERY_STATUS = 'Delivered'
Group By Campaign_id,DELIVERY_STATUS
union
SELECT count(DELIVERY_STATUS) as CLICKED_STATUS
FROM sp_sms_view
Where CAMPAIGN_ID in (3600,3603) and CLICKED_STATUS = 'Clicked'
Group By Campaign_id,DELIVERY_STATUS,CLICKED_STATUS
Output Received
i am using this query
SELECT count(CAMPAIGN_ID) as CAMPAIGN_ID
FROM sp_sms_view
Where CAMPAIGN_ID in (3600,3603)
Group By Campaign_id
union
SELECT count(DELIVERY_STATUS) as DELIVERY_STATUS
FROM sp_sms_view
Where CAMPAIGN_ID in (3600,3603) and DELIVERY_STATUS = 'Delivered'
Group By Campaign_id,DELIVERY_STATUS
union
SELECT count(DELIVERY_STATUS) as CLICKED_STATUS
FROM sp_sms_view
Where CAMPAIGN_ID in (3600,3603) and CLICKED_STATUS = 'Clicked'
Group By Campaign_id,DELIVERY_STATUS,CLICKED_STATUS
Output Received
555 | ||||||||||||
24659 | ||||||||||||
535 | ||||||||||||
23983 | ||||||||||||
118 | ||||||||||||
7207 Required Output
|