dbTalk Databases Forums  

count rows where category..

comp.databases.mysql comp.databases.mysql


Discuss count rows where category.. in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
L
 
Posts: n/a

Default count rows where category.. - 02-26-2011 , 04:09 PM






Hi,

How to count rows WHERE category="x" AND date BETWEEN (first d of month)
AND (last d of month) for every day?

For category='x' in march 2011:

Looking for something like that:
day count
1 3
2 7
...
31 4


Best regards.

Reply With Quote
  #2  
Old   
Robert Hairgrove
 
Posts: n/a

Default Re: count rows where category.. - 02-26-2011 , 04:18 PM






On 02/26/2011 11:09 PM, L wrote:
Quote:
Hi,

How to count rows WHERE category="x" AND date BETWEEN (first d of month)
AND (last d of month) for every day?

For category='x' in march 2011:

Looking for something like that:
day count
1 3
2 7
..
31 4


Best regards.
Put all of this in one line in your browser's URL address field:

http://dev.mysql.com/doc/refman/5.1/en/
group-by-functions.html#function_count

Reply With Quote
  #3  
Old   
L
 
Posts: n/a

Default Re: count rows where category.. - 02-26-2011 , 04:32 PM



W dniu 2011-02-26 23:18, Robert Hairgrove pisze:
Quote:
On 02/26/2011 11:09 PM, L wrote:
Hi,

How to count rows WHERE category="x" AND date BETWEEN (first d of month)
AND (last d of month) for every day?

For category='x' in march 2011:

Looking for something like that:
day count
1 3
2 7
..
31 4


Best regards.

Put all of this in one line in your browser's URL address field:

http://dev.mysql.com/doc/refman/5.1/en/
group-by-functions.html#function_count
thx
not so hard as i fought

Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.