sallarNetwork Performance Dashboard, top wallets paying fee
    Updated 2022-07-13
    with initial_data_one as
    (
    select
    instructions[0]:programId::string as address,
    sum(fee)/1e9 as fee
    from solana.core.fact_transactions
    where block_timestamp::date >= '2022-01-01'
    and instructions[0]:programId::string != '11111111111111111111111111111111'
    and succeeded = FALSE
    group by address
    order by fee DESC
    limit 10
    ),
    initial_data_two as
    (
    select
    'program' as status,
    dl.address_name as address,
    id1.fee as fee
    from initial_data_one id1
    join solana.core.dim_labels dl
    on id1.address = dl.address
    order by fee DESC
    ),
    initial_data_three as
    (
    select
    'normal users' as status,
    signers[0] as address,
    sum(fee)/1e9 as fee
    from solana.core.fact_transactions
    where block_timestamp::date >= '2022-01-01'
    and succeeded = FALSE
    and address not in (select address from initial_data_two)
    group by address
    order by fee DESC
    Run a query to Download Data