This is my query for data is like:
select
('moviestimeidea') as 'circle',
count(distinct msisdn),
vendor,
hour(proess_datetime)
from
campaing_info
where
date(proess_datetime) = curdate()
and length(msisdn) > 4
group by
vendor,
hour(proess_datetime)
order by
hour(proess_datetime);
Which returns this result:
circle count(distinct ani) vendor hour(date_time)
------------------------------------------------------------------
xyz 1 default 0
xyx 5 a 0
xyx 5 b 1
xyx 27 c 1
xyx 5 a 3
xyx 54 b 3
xyx 57 c 4
xyx 5 d 5
but I want this result instead:
circle vendors hour(date_time)
----------------------------------------------------
- default a b c d -
xyx 1 - - - - 0
xyx - 5 - - - 0
xyx - - 5 - - 1
xyx - - - - - 1
xyx - 54 - - - 3
xyx - - 54 - - 3
xyx - - - - - 4
xyx - - - - - 5
like data for c and d vendor Please help