By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,007 Members | 1,248 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,007 IT Pros & Developers. It's quick & easy.

Count of a Group By

P: 2
I would like to count the number of occurrances of any rows with a particular column value, and show a separate count for each day. We have a table that uses a timestamp to differentiate the date and time. I thought I could use the COUNT function combined with GROUP BY. But I'm not sure how to group all rows with a timestamp for the same day. I thought of use using the DAY function, but I can't seem to group by that ( or I'm not using the correct syntax).
Jan 26 '07 #1
Share this Question
Share on Google+
2 Replies


P: 2
Basically, I want sub-totals by day.
Jan 26 '07 #2

P: 7
Use a function to change the timestamp field into a date. Use this intermediate field to group by (and in the select as well of course).
If you change the timestamp into a string, substring the date part from it. Then again use this field for the group by.

Regards,
Jan
Feb 2 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.