PayPal monthly summary SQL

SELECT 
    substr(Date, 7, 4) || '-' || substr(Date, 1, 2) AS month,
    SUM(gross) AS total_gross,
    SUM(fee) AS total_fee
FROM "PayPal_2024_01_01-2024_12_31_"
WHERE Type = 'Subscription Payment'
GROUP BY month
ORDER BY month;

Leave a Reply

Your email address will not be published. Required fields are marked *