with zzh as (
    select p.category product_category,c.age_group age_group,
    sum(s.quantity * s.price) total_sales_amount
    from products p join sales s on p.product_id = s.product_id join customer_info c
    on s.sale_id = c.sale_id
    group by product_category,age_group
    order by product_category
)
select *,round(zzh.total_sales_amount/sum(total_sales_amount) over(partition by product_category),2) purchase_percentage
from zzh