freemartianAdd Liquidity actions to SushiSwap Pools
    Updated 2022-07-21
    select
    count(tx_hash),
    count(origin_from_address) as depositor,
    contract_address as token,
    address_name,
    event_inputs:to as Pool_Address,
    decimals,
    sum(case
    when decimals = '2' then event_inputs:value/pow(10,2)
    when decimals = '4' then event_inputs:value/pow(10,4)
    when decimals = '9' then event_inputs:value/pow(10,18)
    when decimals = '6' then event_inputs:value/pow(10,6)
    when decimals = '8' then event_inputs:value/pow(10,8)
    when decimals = '18' then event_inputs:value/pow(10,18)
    when decimals = '24' then event_inputs:value/pow(10,24)
    end) as value
    from ethereum.core.fact_event_logs l
    inner join ethereum.core.dim_labels c on c.address = l.contract_address or c.address = l.event_inputs:to
    inner join ethereum.core.dim_contracts d on d.address = l.contract_address
    where event_name = 'Transfer'
    and origin_to_address = '0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f'
    and origin_function_signature = '0xe8e33700'
    and event_inputs:from != '0x0000000000000000000000000000000000000000'
    and block_number > '14000000'
    and block_number < '15180000'
    and decimals is not null
    group by pool_address, address_name, token, decimals
    order by value desc
    Run a query to Download Data