jvway Posted December 10, 2009 Share Posted December 10, 2009 Hi all,I'm a bit stumped here. I need to achieve a horizontal bar chart the has a set of three bars per grouping. So it looks something like below. I've got a query (shown below) that creates the counts but I now want to separate by months for the quarter. Are these separate data set items or somehow done in the category or value segments. Thanks for whatever help. _________________Oct ___________________ ________________ _____________Nov ___________________ ________________ Code:SELECT X.TradeShow_Converted, X.TradeShow_New, X.Campaign_Converted, X.Campaign_New, X.ColdCall_Converted, X.ColdCall_New, X.Seminar_Converted, X.Seminar_NewFROM ( SELECT (select count(*) from leads where lead_source = 'Trade Show' AND status = 'Converted' Group by month(DATE_FORMAT(leads.`date_modified`,"%Y-%m-%d")) as TradeShow_Converted, (select count(*) from leads where lead_source = 'Trade Show' AND status = 'New') as TradeShow_New, (select count(*) from leads where lead_source = 'Campaign' AND status = 'Converted') as Campaign_Converted, (select count(*) from leads where lead_source = 'Campaign' AND status = 'New') as Campaign_New, (select count(*) from leads where lead_source = 'Cold Call' AND status = 'Converted') as ColdCall_Converted, (select count(*) from leads where lead_source = 'Cold Call' AND status = 'New') as ColdCall_New, (select count(*) from leads where lead_source = 'Seminar' AND status = 'Converted') as Seminar_Converted, (select count(*) from leads where lead_source = 'Seminar' AND status = 'New') as Seminar_New) AS X Link to comment Share on other sites More sharing options...
jvway Posted January 6, 2010 Author Share Posted January 6, 2010 Bump - Ideas on this? I see this all over the place but can't figure how to start. Thanks,JW Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now