oracle - count of product with parent_category_id -
i have 2 tables table 1: cat_a
table 2:prod_a
out put must
when category_id =1 product_id count must 7 when category_id = 3 product_id count must 5 when category_id = 6 product_id count must 3 when category_id = 7 product_id count must 2 when category_id = 5 product_id count must 2
please me . have searched lot of questions , answers , forums. couldn't find exact solutions. don't want spoon feeding answers . please mention hint or way answer.
my problem resloved.
select count( product_id) prod_a category_id in (select category_id cat_a start category_id = <i_category_id> connect prior category_id = parent_catogory);
Comments
Post a Comment