I have four tables
OFFER (primary key is 'OfferID')
OFFER_VERSION (This table has two Keys i.e combination of 'OfferID' and 'Versionnumber')
OFFER_VERSION_PROD (This table has three keys i.e combination of 'OfferID' ,'Versionnumber' and 'ProdId')
PACKAGE (primary key is 'packageId')
OFFER and OFFER_VERSION_PROD tables are not connected directly but they are connected through OFFER_VERSION table
OFFER -> OFFER_VERSION -> OFFER_VERSION_PROD
OFFER is also connected to PACKAGE table i.e OFFER table has the column
The PACKAGE table is only connected to OFFER table and nothing else.
My requirment is I have to write a query where i have to retrieve record based on 'ProdId' and 'packageId'.
any idea how i can accomplish that.