RE: dumb sql question

2005-03-02 Thread Nick McClure
n Childress [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 02, 2005 4:19 PM > To: CF-Community > Subject: Re: dumb sql question > > Internally, the grouping may occur in a different order, and the > dataset may be output in a different order. However, in this case the > resulting

Re: dumb sql question

2005-03-02 Thread Cameron Childress
-0500, Nick McClure <[EMAIL PROTECTED]> wrote: > The order is very important, it will group based on the order of those > items. > > > -Original Message- > > From: Cameron Childress [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, March 02, 2005 3:27 PM > >

RE: dumb sql question

2005-03-02 Thread Nick McClure
The order is very important, it will group based on the order of those items. > -Original Message- > From: Cameron Childress [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 02, 2005 3:27 PM > To: CF-Community > Subject: Re: dumb sql question > > I'm pretty su

Re: dumb sql question

2005-03-02 Thread Cameron Childress
I'm pretty sure the order is irrelevant, but it should be easy enough to verify with a couple of CFDUMPs of the result. I've done my fair share of reporting and stats lately, and I'm pretty sure my initial code should work. -Cameron On Wed, 2 Mar 2005 11:54:03 -0600, Raymond Camden <[EMAIL PROT

RE: dumb sql question

2005-03-02 Thread Dawson, Michael
or each *unique* combination of the *values* of the columns specified in the GROUP BY" M!ke -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 11:54 AM To: CF-Community Subject: Re: dumb sql question Hmm, so I thought that when you di

RE: dumb sql question

2005-03-02 Thread Dawson, Michael
02, 2005 11:54 AM To: CF-Community Subject: Re: dumb sql question Hmm, so I thought that when you did GROUP BY A, B, C that it _first_ grouped by A, then B, etc. So if A is the day of the month, it would group all items with the same Day of Mo

Re: dumb sql question

2005-03-02 Thread Raymond Camden
Hmm, so I thought that when you did GROUP BY A, B, C that it _first_ grouped by A, then B, etc. So if A is the day of the month, it would group all items with the same Day of Month, then group by B. Or am i wrong? On Wed, 2 Mar 2005 08:48:11 -0800, Cameron Childress <[EMAIL PROTECTED]> wrote:

Re: dumb sql question

2005-03-02 Thread Cameron Childress
No, I don't think so. They will both have the same day() month(), year(). -Cameron On Wed, 2 Mar 2005 09:28:14 -0600, Raymond Camden <[EMAIL PROTECTED]> wrote: > Won't your group be broken though if two sales occur on the same day > of the month? ~~~

RE: dumb sql question

2005-03-02 Thread Nick McClure
D) FROM Table GROUP by oneDay ORDER BY oneDay > -Original Message- > From: Raymond Camden [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 02, 2005 10:28 AM > To: CF-Community > Subject: Re: dumb sql question > > Sorry, I forgot to say - this is MS Access (yes yes, I kn

Re: dumb sql question

2005-03-02 Thread Raymond Camden
Won't your group be broken though if two sales occur on the same day of the month? On Tue, 1 Mar 2005 18:33:54 -0800, Cameron Childress <[EMAIL PROTECTED]> wrote: > Depending on platform - something like: > > SELECT sum(amount) as sales, day(transdate) + month(transdate) + > year(transdate) > F

Re: dumb sql question

2005-03-02 Thread Raymond Camden
lumn IS NOT NULL > GROUP BY > CONVERT(varchar(10), dateColumn, 105) > ORDER BY > dateColumn > > M!ke > > -Original Message- > From: Raymond Camden [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 01, 2005 8:12 PM > To: CF-Community > Subject: d

Re: dumb sql question

2005-03-01 Thread Cameron Childress
Oh... count... :) Same - but count(somecolumn) :) -Cameron On Tue, 1 Mar 2005 18:33:54 -0800, Cameron Childress <[EMAIL PROTECTED]> wrote: > Depending on platform - something like: > > SELECT sum(amount) as sales, day(transdate) + month(transdate) + > year(transdate) > FROM orders > GROUP BY

Re: dumb sql question

2005-03-01 Thread Cameron Childress
Depending on platform - something like: SELECT sum(amount) as sales, day(transdate) + month(transdate) + year(transdate) FROM orders GROUP BY day(transdate), month(transdate), year(transdate) -Cameron On Tue, 1 Mar 2005 20:11:39 -0600, Raymond Camden <[EMAIL PROTECTED]> wrote: > I want to count

RE: dumb sql question

2005-03-01 Thread Dawson, Michael
dateColumn IS NOT NULL GROUP BY CONVERT(varchar(10), dateColumn, 105) ORDER BY dateColumn M!ke -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 01, 2005 8:12 PM To: CF-Community Subject: dumb sql question I want to count the number of orders per

dumb sql question

2005-03-01 Thread Raymond Camden
I want to count the number of orders per day, where the datetime property has, obviously, a date and time. I want to ignore the time and just get a sum based on date. I know this is simple, but it's been a real long day. -- === R