C
carl
My database looks like this:
underlying option symbol exchange PC Vol BD Vol MM Vol date Product
AAPL AAPL W 1043 304 2447 20110414 OSTK
AAPL AAPL C 41301 5415 42566 20110414 OSTK
AAPL AAPL I 41308 5252 37964 20110414 OSTK
AAPL AAPL Q 43155 3042 20397 20110414 OSTK
AAPL AAPL X 33980 9266 38232 20110414 OSTK
AAPL AAPL1C O 103 3 58 20110414 OSKF
AAPL AAPL A 67167 3415 61854 20110414 OSTK
AAPL AAPL P 17292 2116 17702 20110414 OSTK
AAPL AAPL Z 22441 3384 9763 20110414 OSTK
AAPL AAPL B 7864 2334 6984 20110414 OSTK
I need a query which will for a given date (prompted), produce a table/
report like this:
underlying Total A B C I O P Q W X Z
AAPL 548152 24% 3% 16% 15% 0% 7% 12% 1% 15% 6%
Where Total is the sum for all exchanges PC Vol, BD Vol, and MM Vol
for the underlying. My database has more than one underlying. Also
need this total to reflect only Product=OSTK.
For A,B,C,I etc (exchange), the value is their respective sum of PC
Vol, BD, Vol, and MM Vol divided by Total - thus the % share of the
total.
Is this possible to do in a query ?
Thank you inadvance.
underlying option symbol exchange PC Vol BD Vol MM Vol date Product
AAPL AAPL W 1043 304 2447 20110414 OSTK
AAPL AAPL C 41301 5415 42566 20110414 OSTK
AAPL AAPL I 41308 5252 37964 20110414 OSTK
AAPL AAPL Q 43155 3042 20397 20110414 OSTK
AAPL AAPL X 33980 9266 38232 20110414 OSTK
AAPL AAPL1C O 103 3 58 20110414 OSKF
AAPL AAPL A 67167 3415 61854 20110414 OSTK
AAPL AAPL P 17292 2116 17702 20110414 OSTK
AAPL AAPL Z 22441 3384 9763 20110414 OSTK
AAPL AAPL B 7864 2334 6984 20110414 OSTK
I need a query which will for a given date (prompted), produce a table/
report like this:
underlying Total A B C I O P Q W X Z
AAPL 548152 24% 3% 16% 15% 0% 7% 12% 1% 15% 6%
Where Total is the sum for all exchanges PC Vol, BD Vol, and MM Vol
for the underlying. My database has more than one underlying. Also
need this total to reflect only Product=OSTK.
For A,B,C,I etc (exchange), the value is their respective sum of PC
Vol, BD, Vol, and MM Vol divided by Total - thus the % share of the
total.
Is this possible to do in a query ?
Thank you inadvance.