Here's the data:
And I enter this command in PHPMYADMIN:
And this is what I get:
I'm perplexed. There are clearly 3 "January's" in this table.
Code:
edate name
2007-01-17 Widget-1
2007-01-25 Widget-2
2007-01-04 Widget-3
2007-02-10 Widget-4
2007-02-01 Widget-5
2007-03-01 Widget-6
2007-03-15 Widget-7
2007-03-20 Widget-8
And I enter this command in PHPMYADMIN:
Code:
SELECT monthname(edate) as mon, year(edate) as yr, count(month(edate)) as cnt FROM widgettable GROUP by mon ORDER by edate;
And this is what I get:
Code:
mon yr cnt
January 2007 1
February 2007 2
March 2007 3
I'm perplexed. There are clearly 3 "January's" in this table.