количество количества и группа по какой -то статье

SUM(quantity) OVER (PARTITION BY article) AS total_units_sold

and 

SUM(quantity) OVER (PARTITION BY article, sale_month) AS units_sold_month,
  
  and 

( ( SUM(quantity) OVER (PARTITION BY article, sale_month)::decimal /
           SUM(quantity) OVER (PARTITION BY article)::decimal ) * 100
       ) AS month_percentage
HxnRxa