danielrMonthly count of transactions
    Updated 2023-06-05
    -- forked from Weekly count of transactions @ https://flipsidecrypto.xyz/edit/queries/d5b8de74-1c31-42f9-90d5-d501d1941bd3

    -- forked from Daily count of transactions @ https://flipsidecrypto.xyz/edit/queries/2cc3d97e-fafa-40bf-bc76-093e0fc240f3

    with A as
    (select date_trunc('{{Date_Trunc}}',BLOCK_TIMESTAMP) date,
    SUPPLIED_USD as Amount,
    'Supplied' as type,
    AAVE_VERSION,
    TX_HASH
    FROM ethereum.aave.ez_deposits
    where block_timestamp>=CURRENT_DATE - {{Period_From_Current_Date}}
    and aave_market = '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9'
    ),
    B as
    (select date_trunc('{{Date_Trunc}}',BLOCK_TIMESTAMP) date,
    WITHDRAWN_USD as Amount,
    'Withdrawn' as type,
    AAVE_VERSION,
    TX_HASH
    FROM ethereum.aave.ez_withdraws
    where block_timestamp>=CURRENT_DATE - {{Period_From_Current_Date}}
    and aave_market = '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9'
    ),
    C as
    (select * from
    (select * from A
    union all
    select * from B))
    SELECT date, AAVE_VERSION,
    count(distinct tx_hash)
    from C
    group by 1, 2



    Run a query to Download Data