My issue
which hidden test cases
My code
SELECT
dps.product_type,
dps.product_id,
ms.units_sold,
ms.month
FROM
monthly_sales ms
JOIN
division_product_sales dps
ON
ms.month = dps.month
WHERE
dps.margin_category = 'High_Margin'
AND ms.year = 2024 -- Replace 2024 with the desired year
ORDER BY
ms.month, dps.product_type, dps.product_id;
SELECT
dps.product_type,
dps.product_id,
ms.units_sold,
ms.month
FROM
monthly_sales ms
JOIN
division_product_sales dps
ON
ms.month = dps.month
WHERE
dps.profit_margin = 'High_Margin'
AND ms.year = 2024 -- Replace 2024 with the desired year
ORDER BY
ms.month, dps.product_type, dps.product_id;
SELECT
dps.product_type,
dps.product_id,
ms.units_sold,
ms.sales_month AS month
FROM
monthly_sales ms
JOIN
division_product_sales dps
ON
ms.sales_month = dps.sales_period
WHERE
dps.margin_category = 'High_Margin'
AND ms.year = 2024 -- Replace 2024 with the desired year
ORDER BY
ms.sales_month, dps.product_type, dps.product_id;
Learning course: Database management systems
Problem Link: Project - JOIN and Filtering in Database management systems