If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Fetch rows with timestamp within a week range

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-21-09, 16:22
Typetype Typetype is offline
Registered User
 
Join Date: Jun 2009
Posts: 2
Fetch rows with timestamp within a week range

I'm working with a fairly large query that fetches all rows in a database that have a timestamp occuring during a particular week. Within that query, I want to fetch the SUM of all returned rows that occur on a particular day (Monday, Tuesday, etc).

Is there a nice, clean way of handling this sort of thing, or should I split the operation into multiple queries, or sub-queries?
Reply With Quote
  #2 (permalink)  
Old 06-21-09, 22:46
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
fetch using your start and end dates, group by dayofweek.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On