|
Posted by Bob Bedford on 07/06/06 15:27
Hi all,
> SELECT count( DISTINCT a.idperson ) , b.region
> FROM `table1` a
> JOIN `table2` b
> USING ( zip )
> GROUP BY region
Now I've an other question, as I can't get it to work, even with your
example.
I've a table where there is a datetime field.
I'd like to count the number of articles created every day. How to do so ?
I've tried this:
select distinct date_format(DateTimeCreation,'%d %m %Y'), count(distinct
idarticle) from articles group by DateTimeCreation order by DateTimeCreation
ASC
What I'd like is a table with
date nbre of creation
2006-01-01 3
2006-01-02 2
2006-01-03 5
2006-01-04 7
and so on.....
actually I've:
DateTimeCreation
2006-01-01 09:11:03
2006-01-01 12:01:22
2006-01-01 18:42:17
2006-01-02 10:27:55
.....
Thanks for help.
Bob
Navigation:
[Reply to this message]
|