MLDZMNTotal-flash
    Updated 2023-04-13
    with tb1 as (select
    *
    from ethereum.core.fact_event_logs logs
    where contract_address in ('0x7d2768de32b0b80b7a3454c06bdac94a69ddc7a9', '0x398ec7346dcd622edc5ae82352f02be94c62d119')
    and event_name = 'FlashLoan'
    and tx_status = 'SUCCESS'
    and block_timestamp >= '2022-01-01')

    select
    count(distinct tx_hash) as frequency,
    count(distinct ORIGIN_FROM_ADDRESS) as wallets,
    sum(AMOUNT_USD)/6 as volume
    from ethereum.core.ez_token_transfers
    where tx_hash in (select tx_hash from tb1)

    Run a query to Download Data