SELECT PVD_Prod_Code, PVD_Year, PVD_Month, PVD_PVDU, PVD_PVDP FROM VEN_TempPVD WHERE PVD_Prod_Code IN ('00277','00285') AND ((PVD_Year='2020' AND PVD_Month ='12') OR (PVD_Year='2021' AND PVD_Month ='01') OR (PVD_Year='2021' AND PVD_Month ='02'))ORDER BY PVD_Prod_Code ASC, PVD_Year ASC, PVD_Month ASC;
SELECT PVD_Prod_Code, PVD_Year, PVD_Month, PVD_PVDU, PVD_PVDP FROM VEN_TempPVD WHERE PVD_Prod_Code IN ('00277','00285') AND ((PVD_Year='2020' AND PVD_Month ='12') OR (PVD_Year='2021' AND PVD_Month ='01') OR (PVD_Year='2021' AND PVD_Month ='02'))ORDER BY PVD_Prod_Code ASC, PVD_Year ASC, PVD_Month ASC;
SELECT PVD_Prod_Code, PVD_Year, PVD_Month, PVD_PVDU, PVD_PVDP FROM VEN_TempPVD WHERE PVD_Prod_Code IN ('00277','00285') AND CONCAT(PVD_Year, '-',PVD_Month) IN ('2021-02', '2021-01', '2020-12') ORDER BY PVD_Prod_Code ASC, PVD_Year ASC, PVD_Month ASC;
SELECT PVD_Prod_Code, PVD_Year, PVD_Month, PVD_PVDU, PVD_PVDP FROM VEN_TempPVD WHERE PVD_Prod_Code IN ('00277','00285') AND CONCAT(PVD_Year, '-',PVD_Month) IN ('2021-02', '2021-01', '2020-12') ORDER BY PVD_Prod_Code ASC, PVD_Year ASC, PVD_Month ASC;
SELECT
MAX(KeyIdT_VEN_PVD),
PVD_Prod_Code,
CONCAT(PVD_Year, '-', PVD_Month) AS PVD_Period,
PVD_PVDU,
PVD_PVDP
FROM
VEN_TempPVD
WHERE
PVD_Prod_Code IN('00277') AND CONCAT(PVD_Year, '-', PVD_Month) IN('2021-09', '2021-08', '2021-07')
GROUP BY
KeyIdT_VEN_PVD
ORDER BY
PVD_Prod_Code ASC,
PVD_Year ASC,
PVD_Month ASC;
SELECT
MAX(KeyIdT_VEN_PVD),
PVD_Prod_Code,
CONCAT(PVD_Year, '-', PVD_Month) AS PVD_Period,
PVD_PVDU,
PVD_PVDP
FROM
VEN_TempPVD
WHERE
PVD_Prod_Code IN('00277') AND CONCAT(PVD_Year, '-', PVD_Month) IN('2021-09', '2021-08', '2021-07')
GROUP BY
KeyIdT_VEN_PVD
ORDER BY
PVD_Prod_Code ASC,
PVD_Year ASC,
PVD_Month ASC;
SELECT
MAX(KeyIdT_VEN_PVD),
PVD_Prod_Code,
CONCAT(PVD_Year, '-', PVD_Month) AS PVD_Period,
PVD_PVDU,
PVD_PVDP
FROM
VEN_TempPVD
WHERE
PVD_Prod_Code IN('00277') AND CONCAT(PVD_Year, '-', PVD_Month) IN('2021-09', '2021-08', '2021-07')
GROUP BY
KeyIdT_VEN_PVD
ORDER BY
PVD_Prod_Code ASC,
PVD_Year ASC,
PVD_Month ASC;
SELECT
MAX(KeyIdT_VEN_PVD),
PVD_Prod_Code,
CONCAT(PVD_Year, '-', PVD_Month) AS PVD_Period,
PVD_PVDU,
PVD_PVDP
FROM
VEN_TempPVD
WHERE
PVD_Prod_Code IN('00277') AND CONCAT(PVD_Year, '-', PVD_Month) IN('2021-09', '2021-08', '2021-07')
GROUP BY
KeyIdT_VEN_PVD
ORDER BY
PVD_Prod_Code ASC,
PVD_Year ASC,
PVD_Month ASC;