My issue
give answer of this question
My code
WITH RankedSales AS (
SELECT
ps.product_id,
ps.month,
ps.units_sold,
RANK() OVER (PARTITION BY ps.product_id ORDER BY ps.units_sold ASC) AS rank
FROM
division_product_sales ps
JOIN
product_catalog pc
ON
ps.product_id = pc.product_id
)
SELECT
product_id,
units_sold,
month
FROM
RankedSales
WHERE
rank = 1
ORDER BY
product_id;
Learning course: Database management systems
Problem Link: Project - Correlated Subquery and Table Join in Database management systems