Goal is to select data from a table ec_rates, but some conversion is needed to have the right data/column header in a csv file
Please see 2 lines of data from the table and what I would like
rate_code market_date bid ask mid
FR.EUR.GBY.0.0.1 2012-03-14 0.32 0.32 0.32
FR.EUR.GBY.0.0.2 2012-03-14 0.681 0.681 0.681
Goal:
'market_date' needs to be converted into 'DATE'
mid rate for 'FR.EUR.GBY.0.0.1' needs to be taken into the column 'EURFRGBOND1Y'
mid rate for 'FR.EUR.GBY.0.0.2' needs to be taken into the column 'EURFRGBOND2Y'
Report (where data for column 2+3 is the mid rate):
DATE EURFRGBOND1Y EURFRGBOND2Y
2012-03-14 0.32 0.681
SELECT market_date as DATE,
...
from ec_rates
Please see 2 lines of data from the table and what I would like
rate_code market_date bid ask mid
FR.EUR.GBY.0.0.1 2012-03-14 0.32 0.32 0.32
FR.EUR.GBY.0.0.2 2012-03-14 0.681 0.681 0.681
Goal:
'market_date' needs to be converted into 'DATE'
mid rate for 'FR.EUR.GBY.0.0.1' needs to be taken into the column 'EURFRGBOND1Y'
mid rate for 'FR.EUR.GBY.0.0.2' needs to be taken into the column 'EURFRGBOND2Y'
Report (where data for column 2+3 is the mid rate):
DATE EURFRGBOND1Y EURFRGBOND2Y
2012-03-14 0.32 0.681
SELECT market_date as DATE,
...
from ec_rates