From: | Dan Langille <dan(at)langille(dot)org> |
---|---|
To: | Brian Ward <brian0(at)verizon(dot)net> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Need some SQL help |
Date: | 2002-10-07 12:27:20 |
Message-ID: | 20021007082327.K12672-100000@m20.unixathome.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Sun, 6 Oct 2002, Brian Ward wrote:
> I have a table
> id int
> status int
> create_dt datetime
>
> When users log in and out I insert a row into this table throughout the day.
> I'm trying though to come up with a querie to tell me and ordering of users
> as they report in in the morning so i'm trying to say
> select each user and the earliest time the logged in in a give day, then
> order that by the create_dt column.
>
> Having trouble writing the SQL though
select * from table order by id, create_dt
If you want this information only for a specific date, when add in a
where clause : where create_dt GT 'some date'
Change Gt to the greater than character, which isn't working on this
keyboard...
From | Date | Subject | |
---|---|---|---|
Next Message | Dan Langille | 2002-10-07 12:35:08 | Re: timestamp |
Previous Message | Larry Rosenman | 2002-10-07 12:25:08 | Re: timestamp |