0xHaM-dToken Delegation Overview
    Updated 2023-04-13
    with optimism_airdrop_claim_transactions as (
    select
    block_timestamp,
    event_inputs:recipient as address,
    event_inputs:amount as op_amount_claimed
    from optimism.core.fact_event_logs
    where origin_to_address = '0xfedfaf1a10335448b7fa0268f56d2b44dbd357de'
    and contract_address = '0xfedfaf1a10335448b7fa0268f56d2b44dbd357de'
    and event_name = 'Claimed'
    and tx_status = 'SUCCESS'
    and origin_function_signature = '0x2e7ba6ef'
    and block_timestamp::date <= current_date - 1
    ),
    all_claim_overview as (
    select
    count(distinct address) as number_of_user,
    sum(op_amount_claimed/1e18) as total_amount
    from optimism_airdrop_claim_transactions
    ),
    optimism_airdrop_delegations as (
    select
    delegations.tx_hash,
    delegations.block_timestamp,
    delegations.delegator,
    delegations.to_delegate,
    claim.op_amount_claimed as delegate_amount
    from optimism.core.fact_delegations delegations
    join optimism_airdrop_claim_transactions claim
    on delegations.delegator = claim.address
    and delegations.block_timestamp >= claim.block_timestamp
    where delegations.delegation_type = 'First Time Delegator'
    and status = 'SUCCESS'
    )

    select
    count(distinct delegator) as "Number of Delegator",
    Run a query to Download Data