danielrDaily count of transactions
    Updated 2023-06-05
    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