-- SELECT COUNT(*)
-- FROM (
--     SELECT date FROM tb_transaction
--     UNION ALL
--     SELECT date FROM tb_not_panel
-- ) AS combined_dates
-- WHERE YEAR(date) = 2025 AND MONTH(date) = 1

SELECT YEAR(date) AS year, MONTH(date) AS month, COUNT(*) AS total_transactions
FROM (
    SELECT date FROM tb_transaction
    UNION ALL
    SELECT date FROM tb_not_panel
) AS combined_dates
GROUP BY YEAR(date), MONTH(date)
ORDER BY YEAR(date), MONTH(date)