| From: | "Mike Diehl" <jdiehl(at)sandia(dot)gov> |
|---|---|
| To: | "SQL Postgresql List" <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Problem with phone list. |
| Date: | 2007-08-15 20:28:17 |
| Message-ID: | 200708151428.17740.jdiehl@sandia.gov |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Hi all.
I've qot a problem I need to solve. I'm sure it's pretty simple; I just can't
seem to get it, so here goes...
I've got a table, actually a view that joins 3 tables, that contains a phone
number, a unique id, and a call duration.
The phone number has duplicates in it but the unique id is unique.
I need to get a list of distinct phone numbers and the coorisponding largest
call duration.
I've got the idea that this should be a self-join on phone number where
a.id<>b.id, but I just can't seem to get the max duration.
Any hints would be much appreciated.
Mike.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rodrigo De León | 2007-08-15 20:49:25 | Re: Problem with phone list. |
| Previous Message | Richard Broersma Jr | 2007-08-15 19:36:14 | Re: Boolean without default declared |