|
|
Halbert wrote:
>> Logtime, IP, Email
>> 2008/01/01 10:15, 10.2.45.56, me@here
>> 2008/01/01 10:25, 10.2.45.56, me@here
>> 2008/01/01 16:15, 10.2.78.156, me@here
>> 2008/01/02 12:15, 10.2.15.74, me@here
>> 2008/01/02 12:15, 10.2.15.74, me@here
>> 2008/01/02 12:17, 10.2.15.74, me@here
>> 2008/01/02 12:19, 10.2.15.74, me@here
>> 2008/01/01 12:15, 10.5.25.34, you@somewhere
>> 2008/01/01 13:15, 10.5.25.34, you@somewhere
>> 2008/01/01 14:15, 10.5.25.34, you@somewhere
>> 2008/01/01 18:15, 10.5.25.38, you@somewhere
>>
>
> me@here,7
> you@somewhere,4
That's easy, then.
select email, count(*) from logtable where '2008-...' < logtime and
logtime < '2008...' group by email
The "group by" (and possibly "with rollup" and "having" clauses) is what
you need to read up on.
If you need one of the IP addresses or other columns to come back, it's
harder.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
|