I have a table:
create table example(time datetime, username varchar(255));
timeusername
2005-06-21 15:58:02 user1
2005-06-21 14:58:02 user1
2005-06-21 11:57:51 user2
2005-06-21 10:57:51 user1
2005-06-21 09:57:51 user1
The query:
select COUNT(*), username, MAX(time) as
Will this work?
GROUP BY maxtime, user
ORDER BY maxtime DESC
comex wrote:
I have a table:
create table example(time datetime, username varchar(255));
timeusername
2005-06-21 15:58:02 user1
2005-06-21 14:58:02 user1
2005-06-21 11:57:51 user2
2005-06-21 10:57:51 user1
comex [EMAIL PROTECTED] wrote on 06/21/2005 11:07:35 AM:
I have a table:
create table example(time datetime, username varchar(255));
timeusername
2005-06-21 15:58:02 user1
2005-06-21 14:58:02 user1
2005-06-21 11:57:51 user2
2005-06-21 10:57:51 user1
2005-06-21
Basically it boils down to the fact that with SQL you have to use some other
way of telling
each group apart other than position (or interposition, as you say in your
example). The fact
that you have entries in your table from user1, user1, user2, user1, user2,
user3, and user1
doesn't
comex [EMAIL PROTECTED] wrote on 06/21/2005 12:46:00 PM:
Basically it boils down to the fact that with SQL you have to use
some other way of telling
each group apart other than position (or interposition, as you say
in your example). The fact
that you have entries in your table from
How would you like to see that information GROUPed and what does that
grouping represent (physically). In essence, I am asking you to describe
what information you are determining by the grouping process, what does each
GROUP mean to you?
Grouping just means that somebody visited twice in a
On 6/21/05, comex wrote:
I have a table:
create table example(time datetime, username varchar(255));
Please tell me you didn't actualy use time as identifier :)
timeusername
2005-06-21 15:58:02 user1
2005-06-21 14:58:02 user1
2005-06-21 11:57:51 user2
2005-06-21 10:57:51