8/2004 04:17 Subject: Re: SQL challenge
> 1. The average TIME ELAPSED between consecutive REPEATED instances of the
> rowID (GROUP BY rowID, I assume) between one month ago and now.
The easiest solution (if not the only) would be to handle this client side.
If you sort the records by their timestamp you can easily keep track of the
tim
Wow, that was it! I changed the WHERE to (because I wasn't clear):
. . . WHERE theDate BETWEEN SUBDATE(CURDATE(), INTERVAL 1 MONTH) AND
CURDATE() . . .
Now, I have just one more that I still am stumped by, if anyone (Roger or
other) has a second:
Given theTable with 2 columns: rowID (MEDIUMINT
* John Mistler
> I have a difficult query for you that has me stumped. The table has two
> columns: rowID (MEDIUMINT-but *NOT* AUTO_INCREMENT) and theDate
> (DATETIME).
> I need it to find:
>
> 1. The COUNT of REPEATED instances of the rowID in the last month.
>
> - so if there are 5 rows with the
From: "John Mistler" <[EMAIL PROTECTED]>
> I have a difficult query for you that has me stumped. The table has two
> columns: rowID (MEDIUMINT-but *NOT* AUTO_INCREMENT) and theDate
(DATETIME).
> I need it to find:
>
> 1. The COUNT of REPEATED instances of the rowID in the last month.
This is rela
Hi John,
> O.K. you SQL gurus--
>
> I have a difficult query for you that has me stumped. The table has two
> columns: rowID (MEDIUMINT-but *NOT* AUTO_INCREMENT) and theDate
(DATETIME).
> I need it to find:
>
> 1. The COUNT of REPEATED instances of the rowID in the last month.
>
> - so if there