CoinConverseStablecoins on Kashi lending each stable coin
    Updated 2023-04-06
    select block_timestamp::date as dt, case
    when symbol = 'USDC' then 'Ethereum(USDC)'
    when symbol = 'USDT' then 'Ethereum(USDT)'
    when symbol = 'DAI' then 'Ethereum(DAI)' end as deposit_asset,
    count(distinct tx_hash) as num_txs, sum(amount_usd) as deposit_amount
    from ethereum.sushi.ez_lending
    where action = 'Deposit' and block_timestamp::date > current_date - 30 and symbol in ('USDC', 'USDT', 'DAI') and amount_usd > 0
    group by 1, 2
    union all
    select block_timestamp::date as dt, case
    when symbol = 'USDC' then 'Polygon(USDC)'
    when symbol = 'USDT' then 'Polygon(USDT)'
    when symbol = 'DAI' then 'Polygon(DAI)' end as deposit_asset,
    count(distinct tx_hash) as num_txs, sum(amount_usd) as deposit_amount
    from polygon.sushi.ez_lending
    where action = 'Deposit' and block_timestamp::date > current_date - 30 and symbol in ('USDC', 'USDT', 'DAI') and amount_usd > 0
    group by 1, 2
    Run a query to Download Data