LTirrellvalidation_event_types
    Updated 2023-04-28
    -- forked from sol_validatiors @ https://flipsidecrypto.xyz/edit/queries/bca69f38-7b03-4875-ae2d-d037ea570145
    select
    case
    when event_type ilike '%_source'
    or event_type ilike '%_destination' then split_part(event_type, '_', 1)
    else event_type
    end as event_type_normalized,
    event_type,
    date_trunc('day', block_timestamp) as datetime,
    sum(
    case
    when event_type ilike '%_source' then 0
    else 1
    end
    ) as transactions_normalized,
    count(tx_id) as tranactions
    from
    solana.core.ez_staking_lp_actions
    WHERE
    datetime > '2023-03-01'
    group by
    datetime,
    event_type,
    event_type_normalized
    -- with
    -- tx_ids as (
    -- select
    -- -- *
    -- DISTINCT event_type,
    -- any_value(tx_id) as ex_tx_id
    -- from
    -- solana.core.ez_staking_lp_actions
    -- where
    -- block_timestamp::date >= '2023-04-15'
    -- group BY
    -- event_type
    Run a query to Download Data