Re: Advise with a select statement
От | Sachin Srivastava |
---|---|
Тема | Re: Advise with a select statement |
Дата | |
Msg-id | CE9B9481-67A3-4AD5-A0FA-C265308B3493@enterprisedb.com обсуждение исходный текст |
Ответ на | Advise with a select statement (JORGE MALDONADO <jorgemal1960@gmail.com>) |
Ответы |
Re: Advise with a select statement
|
Список | pgsql-novice |
A naive and simple solution is: (Let the table name is table1)
SELECT a.Team, a.Score FROM table1 a, table1 b WHERE a.Score = b. Score and a.Team != b.Team;
On Apr 21, 2011, at 10:35 PM, JORGE MALDONADO wrote:
If I have a table that has a column where values can be the same, how can I SELECT them?For example, consider the following table:--------------------------------------Team Score--------------------------------------T1 500T2 510T3 505T4 499T5 500T6 508T7 505T8 498T9 501As you can see, T1 and T5 have a score of 500; and T3 and T7 have a score of 505. What I want is a SELECT to get only these four records.Respectfully,Jorge Maldonado
В списке pgsql-novice по дате отправления: