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?