[thelist] further info (d'oh! was RE: SQL aggregation ignorance)
Canfield, Joel
JCanfield at PacAdvantage.org
Thu Jul 20 13:22:55 CDT 2006
um, that would be MySQL on a Windows box, using VBScript/classic ASP for
the front end.
d'oh
so for DATEPART I should be looking at DAY(date), MONTH(date), etc.
question still stands, though: does this make sense? any pointers?
sorry and thanks and whatever
joel
> I can't fathom how to do this without multiple trips to the database,
> which irks me.
>
> For reports for our call center, I need to retrieve a
> recordset grouped
> by Rep's Name, then by status, then by date. Results need to be
> something like this:
>
> http://www.spinhead.com/GetRowsSample.html
>
> I can't fathom how to get the results aggregated (counts, sums, and
> averages) by date.
>
> What I'm doing right now is looping through each name,
> getting the stats
> for each status for each date. For a full month I'm running 253
> individual queries (11 reps, 23 business days in May, for instance.)
> It's so very wrong.
>
> Somehow seems like grouping by DATEPART should be my answer, but the
> thick film of sludge over my brain refuses to part.
>
> thanks much
>
> joel
> --
>
> * * Please support the community that supports you. * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>
More information about the thelist
mailing list