connorhPolygon Daily Bridge Amounts
    Updated 2021-11-12
    -- Bridged Amounts to Polygon
    select DATE(block_timestamp) AS balance_date,
    event_name,
    --LOWER(COALESCE(event_inputs:depositReceiver,event_inputs:exitor)) AS user_address,
    SUM(CASE
    WHEN event_name <> 'LockedEther' THEN event_inputs:amount/POWER(10,18)*-1
    ELSE event_inputs:amount/POWER(10,18)
    END) AS amount_eth
    from ethereum.events_emitted
    where
    event_name IN ('LockedEther','ExitedEther') AND
    contract_address = '0x8484ef722627bf18ca5ae6bcf031c23e6e922b30' AND
    LOWER(COALESCE(event_inputs:depositReceiver,event_inputs:exitor)) IS NOT NULL AND
    block_timestamp >= CURRENT_DATE - 360
    GROUP BY 1,2

    Run a query to Download Data