This topic is locked

Help from Query masters

8/20/2007 10:56:24 PM
PHPRunner General questions
W
wildwally author

Ok I have officially come to the end of my wits on trying to get this to work.
How to you get a series of dates:
10/2/2006

12/4/2006

10/15/2006

12/30/2006

1/3//2007
I want to count all the the entries in the last 12 months
like so
Jan 2

Feb 1

etc.....

Oct 2

Dec 2
I'm trying to build a chart that shows how many times someone did something during each month. And there is a total of 4 different operators
in Excel it would look like this i think.
[font=Times New Roman]Jan
[font=Times New Roman]Mar
[font=Times New Roman]May
[font=Times New Roman]Jul
[font=Times New Roman]Sep
[font=Times New Roman]Nov
[font=Times New Roman]Operator#1
[font=Times New Roman]2
[font=Times New Roman]1
[font=Times New Roman]4
[font=Times New Roman]3
[font=Times New Roman]2
[font=Times New Roman]2
[font=Times New Roman]4
[font=Times New Roman]5
[font=Times New Roman]4
[font=Times New Roman]3
[font=Times New Roman]2
[font=Times New Roman]5
[font=Times New Roman]Operator#3
[font=Times New Roman]2
[font=Times New Roman]2
[font=Times New Roman]2
[font=Times New Roman]3
[font=Times New Roman]3
[font=Times New Roman]3
[font=Times New Roman]8
[font=Times New Roman]0
[font=Times New Roman]3
[font=Times New Roman]2
[font=Times New Roman]3
[font=Times New Roman]1
1

J
Jane 8/21/2007

Hi,
you need to edit SQL query for this chart on the Edit SQL query tab.

Here is a sample:

select

date_format(DateField,'%b') as month,

count(FieldName)

from TableName

group by date_format(DateField,'%b')