MySqlTalk.com  

Go Back   MySqlTalk.com > Navicat - MySQL management tool > Navicat Support
User Name
Password
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread
Old 09-05-2005, 08:44 AM   #1
Liat
Junior Member
 
Join Date: Sep 2005
Posts: 8 Liat is on a distinguished road
Graph report with months on x-axis

Hi,

I would like to create a graph that its x-axis is the last 12 months from the current date.
I thought maybe I should group by the date field year and month.
How can I do that? (my date fiedl if `Call Details`.Call_Date ). I don't know how to retrieve Call_Date's month

Or should I convert it to value field? how can I do that?

Thanks a lot,
Liat
Liat is offline   Fork this post Reply With Quote
Old 09-05-2005, 03:36 PM   #2
Azkaban
Senior Member
 
Join Date: Jul 2004
Posts: 167 Azkaban is on a distinguished road
Re: Graph report with months on x-axis

Azkaban is offline   Fork this post Reply With Quote
Old 09-05-2005, 04:39 PM   #3
Liat
Junior Member
 
Join Date: Sep 2005
Posts: 8 Liat is on a distinguished road
Re: Graph report with months on x-axis

Yes, I know how to refer to the month and year of the date field mow - thank you.

If I need to create agraph that contains the following:
In x-axis - we have the months of the date field
In y-axis - we have the % of the claims that were higher than 1000 (for example).

Since its a graph, I need to create a column that contains this percent for each month. I tried to use Group By month(date), year(date) - but then it doesn't allow me to do any calculation...

Is there any way to solve this?? I have ben trying for so long time...

Thanks a lot,
Liat
Liat is offline   Fork this post Reply With Quote
Old 09-05-2005, 07:07 PM   #4
Azkaban
Senior Member
 
Join Date: Jul 2004
Posts: 167 Azkaban is on a distinguished road
Re: Graph report with months on x-axis

Can you write out the statement you are using and the error you are getting. It will be much easier to help by modifying what's not working than to come up with it from scratch.
Azkaban is offline   Fork this post Reply With Quote
Old 09-06-2005, 12:04 PM   #5
Liat
Junior Member
 
Join Date: Sep 2005
Posts: 8 Liat is on a distinguished road
Re: Graph report with months on x-axis

Hi,

You can see below the code (it is working now). I want to put in the x-axis the year, month (for example, 2005, 5). As you can see, I have a column for the month (month1) and a column for the year (year1). How can I do that?

SELECT

month(`Primary_Call_Details`.`Primary_Call_Date`) AS month1,
year(`Primary_Call_Details`.`Primary_Call_Date`) AS year1,
(sum( `Claim_Details`.`Outcome` = 1 AND `Claim_Details`.`Date_Closed` < `Primary_Call_Details`.`Primary_Call_Date`) * 100 / COUNT( * )) AS withdrawnBeforeP


FROM `Claim Details` `Claim_Details`
INNER JOIN `Primary Call Details` `Primary_Call_Details` ON
(`Primary_Call_Details`.`Claim_Reference(Primary)` = `Claim_Details`.`Claim_Reference`)
INNER JOIN `Secondary Call Details` `Secondary_Call_Details` ON
(`Secondary_Call_Details`.`Claims_Reference(Second ary)` = `Primary_Call_Details`.`Claim_Reference(Primary)`)

GROUP BY month(`Primary_Call_Details`.`Primary_Call_Date`), year(`Primary_Call_Details`.`Primary_Call_Date`)


Thanks a lot for you help,
Liat
Liat is offline   Fork this post Reply With Quote
Old 09-06-2005, 02:57 PM   #6
Azkaban
Senior Member
 
Join Date: Jul 2004
Posts: 167 Azkaban is on a distinguished road
Re: Graph report with months on x-axis

You said it's working? So what is it still not doing that you want it to do?

I hope you're not trying to use mysql to create a graph directly? As far as I know it doesn't do that. I've assumed all along you understood the data needs to be exported to another tool to create the graph.
Azkaban is offline   Fork this post Reply With Quote
Old 09-06-2005, 03:35 PM   #7
Liat
Junior Member
 
Join Date: Sep 2005
Posts: 8 Liat is on a distinguished road
Re: Graph report with months on x-axis

ohh, no. I use Navicat - I created a report that its query is used as an input for the graph - DBChart, isn't it right to do it this way??
Liat is offline   Fork this post Reply With Quote
Old 09-06-2005, 06:26 PM   #8
Azkaban
Senior Member
 
Join Date: Jul 2004
Posts: 167 Azkaban is on a distinguished road
Re: Graph report with months on x-axis

I didn't even notice that it was in the Navicat section. Sorry, don't really know Navicat. Hopefully someone else will be able to help.
Azkaban is offline   Fork this post Reply With Quote
Old 09-06-2005, 06:48 PM   #9
Liat
Junior Member
 
Join Date: Sep 2005
Posts: 8 Liat is on a distinguished road
Re: Graph report with months on x-axis

ok, thanks a lot
Liat is offline   Fork this post Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
1.7 MySQL Information Sources Administrator Documentation 8 06-08-2004 02:58 AM



All times are GMT -4. The time now is 08:17 PM.



Powered by: vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Google
  Web http://www.mysqltalk.com
DISCLAIMERS:
1. We have no commercial interest in this site.
Banner Ads and Subscriptions will only be used to help pay for hosting and maintenance costs.
2. MySQLTalk.com is NOT affiliated with MySQL AB in any way.
3. MySQLTalk.com is NOT endorsed by MySQL AB in any way.
4. Please do not post any content that is harmful to MySQL or MySQL AB, meaning no misleading or obsolete information will be tolerated.
Well-founded constructive criticism meant to help the community is permitted.
5. This website is founded with the goal of improving the MySQL community.
We not only tolerate newbies, we encourage them.
Please do not ask newbies to "read the manual".