Kal
07-16-2008, 05:36 PM
Hi,
I am trying to write a query which gives me a number of deals projected to go live and how many actually went live on a date.
I have the following two queries below which work fine, however I would like to display the results together in threee columns.
SELECT s.ph_projected_live_date, COUNT(s.ph_projected_live_date) AS freq
FROM provisions_history s
WHERE s.ph_projected_live_date != '0000-00-00'
GROUP BY s.ph_projected_live_date
SELECT q.ph_provisioned_date, COUNT(q.ph_provisioned_date) AS freq2
FROM provisions_history q
WHERE q.c_status = 'Live'
GROUP BY q.ph_provisioned_date
ph_projected_live_date, freq, freq2
I am having difficulity in joining the two queries together.
Any help would be great.
I am trying to write a query which gives me a number of deals projected to go live and how many actually went live on a date.
I have the following two queries below which work fine, however I would like to display the results together in threee columns.
SELECT s.ph_projected_live_date, COUNT(s.ph_projected_live_date) AS freq
FROM provisions_history s
WHERE s.ph_projected_live_date != '0000-00-00'
GROUP BY s.ph_projected_live_date
SELECT q.ph_provisioned_date, COUNT(q.ph_provisioned_date) AS freq2
FROM provisions_history q
WHERE q.c_status = 'Live'
GROUP BY q.ph_provisioned_date
ph_projected_live_date, freq, freq2
I am having difficulity in joining the two queries together.
Any help would be great.