Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Join query with aggrigation function

Ketan BembiOct 4 2011 — edited Oct 4 2011
Hi

I have 3 tables ProductExpiryProcess, ProdcutCompanyName, ProductDetail

ProductExpiryProcess table contains expiry process(which tells when product expire) and data like
ProductExpiryProcessId processStartDate processEndDate
1 2011/09/10 2011/09/11
2 2011/08/10 2011/08/11
3 2011/07/10 2011/07/11



ProdcutCompanyName table contains Product's company name and ProductExpiryProcessId and data like
ProdcutCompanyNameId ProductExpiryProcessId ExpiryDate
1 1 2011/09/10
2 1 2011/09/10
3 2 2011/08/10


ProductDetail table contains Price of product and data like
ProdcutCompanyNameId ProductExpiryProcessId ProductPrice
1 1 200
2 1 400
3 2 800

I want to gnerate output like
Month NoOfProductsExpired SumOfProductsPrice
09/2011 2 600
08/2011 1 800

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 1 2011
Added on Oct 4 2011
1 comment
108 views