C
carl
A sample of my data table looks as so:
Underlying ID StrikePrice
AAPL APVA10C155.00 155
AAPL APVM10P155.00 155
AAPL APVA10C160.00 160
AAPL APVM10P160.00 160
AAPL APVA10C165.00 165
AAPL APVM10P165.00 165
AAPL APVD10C160.00 160
AAPL APVP10P160.00 160
AAPL APVD10C165.00 165
AAPL APVP10P165.00 165
AAPL APVD10C155.00 155
AAPL APVP10P155.00 155
AAPL APVB10C155.00 155
AAPL APVN10P155.00 155
AAPL APVB10C160.00 160
AAPL APVN10P160.00 160
AAPL APVB10C165.00 165
AAPL APVN10P165.00 165
GS GPYA10C155.00 155
GS GPYM10P155.00 155
GS GPYA10C160.00 160
GS GPYM10P160.00 160
GS GPYA10C165.00 165
GS GPYM10P165.00 165
GS GPYD10C155.00 155
GS GPYP10P155.00 155
GS GPYD10C160.00 160
GS GPYP10P160.00 160
GS GPYD10C165.00 165
GS GPYP10P165.00 165
GS GPYB10C160.00 160
GS GPYN10P160.00 160
GS GPYB10C165.00 165
GS GPYN10P165.00 165
GS GPYB10C155.00 155
GS GPYN10P155.00 155
I am trying to find a query (if it is possible) to show records where:
Underlying=AAPL and StrikePrice is between 150 to 160 (inclusive)
OR
Underlying=GS and StrikePrice is between 160 and 165 (inclusive)
My actual query will have more Underlying (total of 50) with associated
StrikePrice ranges.
The output would like like this:
Underlying ID StrikePrice
AAPL APVA10C155.00 155
AAPL APVM10P155.00 155
AAPL APVD10C155.00 155
AAPL APVP10P155.00 155
AAPL APVB10C155.00 155
AAPL APVN10P155.00 155
GS GPYA10C160.00 160
GS GPYM10P160.00 160
GS GPYA10C165.00 165
GS GPYM10P165.00 165
GS GPYD10C160.00 160
GS GPYP10P160.00 160
GS GPYD10C165.00 165
GS GPYP10P165.00 165
GS GPYB10C160.00 160
GS GPYN10P160.00 160
GS GPYB10C165.00 165
GS GPYN10P165.00 165
Thank you in advance.
Underlying ID StrikePrice
AAPL APVA10C155.00 155
AAPL APVM10P155.00 155
AAPL APVA10C160.00 160
AAPL APVM10P160.00 160
AAPL APVA10C165.00 165
AAPL APVM10P165.00 165
AAPL APVD10C160.00 160
AAPL APVP10P160.00 160
AAPL APVD10C165.00 165
AAPL APVP10P165.00 165
AAPL APVD10C155.00 155
AAPL APVP10P155.00 155
AAPL APVB10C155.00 155
AAPL APVN10P155.00 155
AAPL APVB10C160.00 160
AAPL APVN10P160.00 160
AAPL APVB10C165.00 165
AAPL APVN10P165.00 165
GS GPYA10C155.00 155
GS GPYM10P155.00 155
GS GPYA10C160.00 160
GS GPYM10P160.00 160
GS GPYA10C165.00 165
GS GPYM10P165.00 165
GS GPYD10C155.00 155
GS GPYP10P155.00 155
GS GPYD10C160.00 160
GS GPYP10P160.00 160
GS GPYD10C165.00 165
GS GPYP10P165.00 165
GS GPYB10C160.00 160
GS GPYN10P160.00 160
GS GPYB10C165.00 165
GS GPYN10P165.00 165
GS GPYB10C155.00 155
GS GPYN10P155.00 155
I am trying to find a query (if it is possible) to show records where:
Underlying=AAPL and StrikePrice is between 150 to 160 (inclusive)
OR
Underlying=GS and StrikePrice is between 160 and 165 (inclusive)
My actual query will have more Underlying (total of 50) with associated
StrikePrice ranges.
The output would like like this:
Underlying ID StrikePrice
AAPL APVA10C155.00 155
AAPL APVM10P155.00 155
AAPL APVD10C155.00 155
AAPL APVP10P155.00 155
AAPL APVB10C155.00 155
AAPL APVN10P155.00 155
GS GPYA10C160.00 160
GS GPYM10P160.00 160
GS GPYA10C165.00 165
GS GPYM10P165.00 165
GS GPYD10C160.00 160
GS GPYP10P160.00 160
GS GPYD10C165.00 165
GS GPYP10P165.00 165
GS GPYB10C160.00 160
GS GPYN10P160.00 160
GS GPYB10C165.00 165
GS GPYN10P165.00 165
Thank you in advance.