kasadeghThe program type that has paid the most fees for failed transactions in the last month
    Updated 2022-07-13

    with solana_transactions_2022 as (
    select * from solana.core.fact_transactions
    where BLOCK_TIMESTAMP::date >= '2022-06-1' and SUCCEEDED=FALSE
    )
    ,
    solana_event_2022 as (
    select * from solana.core.fact_events
    where BLOCK_TIMESTAMP::date >= '2022-06-1' and SUCCEEDED=FALSE
    )
    select label.LABEL_TYPE, sum(FEE) as Total_Fee
    from solana_event_2022 as event
    JOIN solana.core.dim_labels as label
    on event.PROGRAM_ID=label.ADDRESS
    join solana_transactions_2022 as transactions
    on transactions.TX_ID=event.TX_ID
    group by label.LABEL_TYPE
    order by Total_Fee desc

    Run a query to Download Data