Problems with select statement

Поиск
Список
Период
Сортировка
От phil campaigne
Тема Problems with select statement
Дата
Msg-id 421901F7.2070401@charter.net
обсуждение исходный текст
Ответы Re: Problems with select statement  (Ragnar Hafstað <gnari@simnet.is>)
Список pgsql-general
I see that I need another qualifier, cum_score in the select statement,
but I still need to consolidate the rows:

hardwoodthunder=# select player_number, player_name, cum_score, (select
player_points where aspect='A') as A ,(select player_points where
aspect='C') as C, (select player_points where aspect='T') as T from
(select * from player as a,teamshare as b where
a.player_number=b.player) as c;

 player_number | player_name | cum_score |  a   |  c   |  t
---------------+-------------+-----------+------+------+-----
 42            | S. Randolph |         4 | 0.27 |      |
 42            | S. Randolph |         4 |      | 0.33 |
 42            | S. Randolph |         4 |      |      | 0.8
 42            | S. Randolph |         2 | 0.54 |      |
 42            | S. Randolph |         2 |      | 0.66 |
 42            | S. Randolph |         2 |      |      | 0.8
 40            | R. Perkins  |         4 | 0.27 |      |
 40            | R. Perkins  |         4 |      | 0.33 |
(8 rows)

How all three (Randolph, 4) rows into one row?
thanks,
Phil


В списке pgsql-general по дате отправления:

Предыдущее
От: Devrim GUNDUZ
Дата:
Сообщение: Re: Which parameters requires a restart?
Следующее
От: Ragnar Hafstað
Дата:
Сообщение: Re: Problems with select statement