All pastes #4135 Raw Edit

postgresql table rotate

public text v1 · immutable
#4135 ·published 2005-01-13 15:14 UTC
rendered paste body
gamesyard=> select stage,count(*) from d_game_orders_agg where entry_date='2004-12-10' group by stage;
           stage           | count
---------------------------+-------
 Product Information       |    24
 Billing Information       |    12
 Confirmation              |     2
 Thank you for your order! |     2
 Shipping Information      |     1
(5 rows)

want this to turn into something like this:

Product Information | Billing Information | Confirmation | Thank you ..
--------------------+---------------------+--------------+----------
24                  | 12                  | 2            |