permaryAccounts paying the most fees
    Updated 5 days ago
    with stellar_price_data as (
    select
    price as current_price
    from crosschain.price.ez_prices_hourly
    where blockchain = 'stellar'
    and symbol = 'XLM'
    and is_native = true
    and hour >= dateadd(year, -1, current_date())
    order by hour desc
    limit 1
    ),
    fee_data as (
    select
    fee_account,
    sum(fee_charged) as total_fees,
    count(*) as tx_count,
    avg(fee_charged) as avg_fee
    from stellar.core.fact_transactions
    where block_timestamp >= dateadd(year, -1, current_date())
    group by 1
    )
    select
    fee_data.fee_account,
    to_char(fee_data.total_fees, 'FM999,999,999,999') as total_fees_stroops,
    to_char(fee_data.total_fees / pow(10,7), 'FM999,999,999,999.0000000') as total_fees_xlm,
    to_char(fee_data.tx_count, 'FM999,999,999,999') as tx_count,
    to_char(fee_data.avg_fee, 'FM999,999,999,999') as avg_fee_stroops,
    to_char(fee_data.avg_fee / pow(10,7), 'FM999,999,999,999.0000000') as avg_fee_xlm,
    concat('$', to_char(stellar_price_data.current_price, 'FM999,999,999,999.0000000')) as xlm_price_usd,
    concat('$', to_char((fee_data.total_fees / pow(10,7)) * stellar_price_data.current_price, 'FM999,999,999,999.00')) as total_fees_usd,
    concat('$', to_char((fee_data.avg_fee / pow(10,7)) * stellar_price_data.current_price, 'FM999,999,999,999.0000000')) as avg_fee_usd
    from fee_data
    cross join stellar_price_data
    order by fee_data.total_fees desc
    limit 10;

    Last run: 5 days ago
    FEE_ACCOUNT
    TOTAL_FEES_STROOPS
    TOTAL_FEES_XLM
    TX_COUNT
    AVG_FEE_STROOPS
    AVG_FEE_XLM
    XLM_PRICE_USD
    TOTAL_FEES_USD
    AVG_FEE_USD
    1
    ###,###,###,###745,050.76602831,605,510,4414,6410.0004641$0.2870100$213,837.02$0.0001332
    2
    GBGWQFSJSOMJ2BTOH5RLZUTZPV544YR2DF5CGYL7WDZ2Y6OSRHR6TUBE417,324,184,34541,732.41843452,417,968172,5930.0172593$0.2870100$11,977.62$0.0049536
    3
    GAUA7XL5K54CC2DDGP77FJ2YBHRJLT36CPZDXWPM6MP7MANOGG77PNJU73,634,629,2337,363.462923322,241,4573,3110.0003311$0.2870100$2,113.39$0.0000950
    4
    GDJLH2F7DBI6GC22J7YUTPAEFRSWKG5MN5RSE2GOOYUTO4BH66LHENRW32,158,426,3423,215.8426342303,192106,0660.0106066$0.2870100$922.98$0.0030442
    5
    GDB3RSSWTUXO7MBTNMHUP3DRBIUR3QRV2CVFRAKMN4GM2B4QNGEUT6CU13,847,857,9651,384.78579653,354,9324,1280.0004128$0.2870100$397.45$0.0001185
    6
    GBMUZ7DCFWJ47CI2FGFR4NIVSZNPPZENJJWNG7THSRWQWFZVNUNZJTR49,401,999,452940.19994521,246,9947,5400.0007540$0.2870100$269.85$0.0002164
    7
    GAMYOPMLLCMQQG65YTFJ4INIHTLWN24WNMJ5BNRPZX5LMHAZBMDQRETG4,710,047,879471.00478794,0021,176,9240.1176924$0.2870100$135.18$0.0337789
    8
    GCMPFUGGGUEPSWP5ZI6NE7HOPVM2RYQHPM3KLDDP4RRBUI7BRL4IS77O3,022,832,830302.2832830547,2615,5240.0005524$0.2870100$86.76$0.0001585
    9
    GCKLXK57MAG3ZC77U4HCFDKBHUWDK2WG2WFNES2DLD2IRWSSBYDI5DWZ1,975,271,842197.5271842713,5782,7680.0002768$0.2870100$56.69$0.0000794
    10
    GCZGSFPITKVJPJERJIVLCQK5YIHYTDXCY45ZHU3IRCUC53SXSCAL44JV1,781,924,400178.1924400304,5215,8520.0005852$0.2870100$51.14$0.0001679
    10
    2KB
    47s