?

Log in

No account? Create an account

March 15th, 2008

Sure you can.

beancounter=# select date, AAPL.day_open as "AAPL", "OJH08.NYB".day_open as "OJH08.NYB"
from (select date, day_open from stockprices where symbol = 'AAPL') as AAPL
join (select date, day_open from stockprices where symbol = 'OJH08.NYB') as "OJH08.NYB"
using (date);
    date    |  AAPL  | OJH08.NYB 
------------+--------+-----------
 2008-03-10 | 121.98 |     124.5
(1 row)

(Oranges win.)