Afonso_Diazwide-teal
    Updated 2025-02-19
    with

    pricet as (
    select
    hour::date as date,
    avg(price) as token_price_usd
    from
    crosschain.price.ez_prices_hourly
    where
    token_address = 'So11111111111111111111111111111111111111112'
    and blockchain = 'solana'
    group by 1
    ),

    main as (
    -- select
    -- tx_id,
    -- block_timestamp,
    -- provider_address as user,
    -- deposit_amount as amount,
    -- deposit_amount * token_price_usd as amount_usd,
    -- action_type as event_name
    -- from
    -- solana.marinade.ez_liquid_staking_actions
    -- left join
    -- pricet on block_timestamp::date = date
    -- where
    -- action_type = 'deposit'
    -- and tx_id in (select distinct tx_id from solana.core.fact_events where program_id = 'MR2LqxoSbw831bNy68utpu5n4YqBH3AzDmddkgk9LQv')

    -- union all

    select
    tx_id,
    block_timestamp,
    provider_address as user,
    QueryRunArchived: QueryRun has been archived