Sajjadiii1.2Sushi-109
    Updated 2022-08-24
    select 'farmers 'as type ,
    count (distinct origin_FROM_ADDRESS) as total_farmers
    from ethereum.core.fact_event_logs
    where block_timestamp >= CURRENT_DATE() - interval '1 year'
    and contract_address = '0xef0881ec094552b2e128cf945ef17a6752b4ec5d' --MasterChefV2
    and EVENT_NAME = 'Deposit'
    and TX_STATUS = 'SUCCESS'
    group by 1


    union

    select 'amount'as type ,
    sum(event_inputs:amount/pow(10,18))as total_farm_amount_Eth
    from ethereum.core.fact_event_logs
    where block_timestamp >= CURRENT_DATE() - interval '1 year'
    and contract_address = '0xef0881ec094552b2e128cf945ef17a6752b4ec5d' --MasterChefV2
    and EVENT_NAME = 'Deposit'
    and TX_STATUS = 'SUCCESS'
    group by 1
    Run a query to Download Data