> ## Documentation Index
> Fetch the complete documentation index at: https://developers.stellar.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Ledger Fee Stats Agg

> Reference documentation for the Ledger Fee Stats Agg table in Hubble's Gold data dictionary.

## Table Metadata

| Property | Configuration |
| - | - |
| Natural Key(s) | ledger\_sequence |
| Partition Field(s) | day\_agg (DAY partition) |
| Clustered Field(s) | day\_agg, ledger\_sequence |
| Documentation | [dbt docs](http://www.stellar-dbt-docs.com/#!/model/model.stellar_dbt_public.ledger_fee_stats_agg) |

## Column Details

| Name | Description | Data Type | Domain Values | Required? | Notes |
| - | - | - | - | - | - |
| day\_agg | Day when the ledger fee stats were aggregated. | DATE | | Yes | |
| ledger\_sequence | The unique ledger sequence number. This is the grain of the table -- one row per ledger. | INTEGER | | Yes | |
| total\_fee\_charged | Sum of fee\_charged across all transactions (Classic + Soroban) in the ledger. This is the total fees actually paid. | INTEGER | | Yes | |
| max\_fee\_charged | Maximum fee\_charged across all transactions (Classic + Soroban) in the ledger. | INTEGER | | Yes | |
| txn\_count | Total number of transactions (Classic + Soroban) in the ledger. | INTEGER | | Yes | |
| failed\_txn\_count | Number of failed transactions (Classic + Soroban) in the ledger. Failed transactions are still included in all fee aggregates because inclusion\_fee\_charged and non\_refundable\_resource\_fee\_charged are charged regardless of transaction success. | INTEGER | | No | |
| total\_effective\_txn\_operation\_count | Total number of effective operations across all transactions in the ledger. Uses effective\_txn\_operation\_count, which adds 1 for fee-bump transactions to account for the extra inner transaction. | INTEGER | | Yes | |
| total\_raw\_txn\_operation\_count | Total number of raw operations (txn\_operation\_count) across all transactions in the ledger. Unlike effective operation count, this does NOT include fee-bump transactions. | INTEGER | | Yes | |
| classic\_txn\_count | Number of Classic transactions in the ledger. Classic transactions have resource\_fee = 0. | INTEGER | | No | |
| classic\_failed\_txn\_count | Number of failed Classic transactions in the ledger. | INTEGER | | No | |
| classic\_total\_effective\_operation\_count | Total number of effective operations across Classic transactions in the ledger. Adds 1 for fee-bump transactions. | INTEGER | | No | |
| classic\_total\_raw\_operation\_count | Total number of raw operations across Classic transactions in the ledger. Does NOT include fee-bump transactions. | INTEGER | | No | |
| classic\_sum\_fee\_charged | Sum of fee\_charged across Classic transactions. For Classic txns, fee\_charged is the inclusion fee (no resource\_fee component). | INTEGER | | No | |
| classic\_max\_fee\_charged | Maximum fee\_charged across Classic transactions in the ledger. | INTEGER | | No | |
| classic\_sum\_max\_fee | Sum of COALESCE(new\_max\_fee, max\_fee) across Classic transactions. Represents total willingness-to-pay. | INTEGER | | No | |
| classic\_max\_max\_fee | Maximum of COALESCE(new\_max\_fee, max\_fee) across Classic transactions in the ledger. | INTEGER | | No | |
| classic\_max\_inclusion\_fee\_per\_op | Maximum inclusion fee per operation (fee\_charged / effective\_txn\_operation\_count) across Classic transactions. Fee-bump txns add 1 to the operation count. | FLOAT | | No | |
| classic\_min\_inclusion\_fee\_per\_op | Minimum inclusion fee per operation across Classic transactions in the ledger. | FLOAT | | No | |
| classic\_surge\_txn\_count | Number of Classic transactions in the ledger where fee\_charged exceeded the base fee (100 stroops per operation), indicating surge pricing. | INTEGER | | No | |
| classic\_surge\_operation\_count | Total operations in Classic transactions that experienced surge pricing in the ledger. | INTEGER | | No | |
| classic\_is\_surge\_ledger | True if any Classic transaction in the ledger experienced surge pricing. | BOOLEAN | | No | |
| soroban\_txn\_count | Number of Soroban transactions in the ledger. Soroban transactions have resource\_fee > 0. | INTEGER | | No | |
| soroban\_failed\_txn\_count | Number of failed Soroban transactions in the ledger. Even failed Soroban transactions are charged inclusion\_fee\_charged and non\_refundable\_resource\_fee\_charged, so they are included in all fee aggregates. | INTEGER | | No | |
| soroban\_total\_effective\_operation\_count | Total number of effective operations across Soroban transactions in the ledger. Adds 1 for fee-bump transactions. | INTEGER | | No | |
| soroban\_total\_raw\_operation\_count | Total number of raw operations across Soroban transactions in the ledger. Does NOT include fee-bump transactions. | INTEGER | | No | |
| soroban\_sum\_fee\_charged | Sum of fee\_charged across Soroban transactions. fee\_charged = inclusion\_fee\_charged + non\_refundable\_resource\_fee\_charged + refundable\_resource\_fee\_charged. | INTEGER | | No | |
| soroban\_max\_fee\_charged | Maximum fee\_charged across Soroban transactions in the ledger. | INTEGER | | No | |
| soroban\_sum\_inclusion\_fee\_charged | Sum of inclusion\_fee\_charged across Soroban transactions. The base inclusion fee is 100 stroops per operation. If inclusion\_fee\_charged exceeds this base, the ledger experienced inclusion fee surge pricing. | INTEGER | | No | |
| soroban\_max\_inclusion\_fee\_charged | Maximum inclusion\_fee\_charged across Soroban transactions in the ledger. | INTEGER | | No | |
| soroban\_sum\_inclusion\_fee\_bid | Sum of inclusion\_fee\_bid across Soroban transactions. inclusion\_fee\_bid = COALESCE(new\_max\_fee, max\_fee) - resource\_fee. | INTEGER | | No | |
| soroban\_max\_inclusion\_fee\_bid | Maximum inclusion\_fee\_bid across Soroban transactions in the ledger. | INTEGER | | No | |
| soroban\_max\_inclusion\_fee\_per\_op | Maximum inclusion fee per operation (inclusion\_fee\_charged / effective\_txn\_operation\_count) across Soroban transactions in the ledger. | FLOAT | | No | |
| soroban\_min\_inclusion\_fee\_per\_op | Minimum inclusion fee per operation across Soroban transactions in the ledger. | FLOAT | | No | |
| soroban\_sum\_resource\_fee | Sum of resource\_fee (the pre-execution budget for Soroban resource consumption) across Soroban transactions in the ledger. | INTEGER | | No | |
| soroban\_max\_resource\_fee | Maximum resource\_fee across Soroban transactions in the ledger. | INTEGER | | No | |
| soroban\_min\_resource\_fee | Minimum resource\_fee across Soroban transactions in the ledger. | INTEGER | | No | |
| soroban\_sum\_non\_refundable\_resource\_fee\_charged | Sum of non\_refundable\_resource\_fee\_charged across Soroban transactions. Covers CPU instructions, read bytes, write bytes, and bandwidth. Charged based on declared resources regardless of tx success/failure. | INTEGER | | No | |
| soroban\_max\_non\_refundable\_resource\_fee\_charged | Maximum non\_refundable\_resource\_fee\_charged across Soroban transactions in the ledger. | INTEGER | | No | |
| soroban\_min\_non\_refundable\_resource\_fee\_charged | Minimum non\_refundable\_resource\_fee\_charged across Soroban transactions in the ledger. | INTEGER | | No | |
| soroban\_sum\_refundable\_resource\_fee\_charged | Sum of refundable\_resource\_fee\_charged across Soroban transactions. Covers rent, events, and return value. Based on actual usage; 0 for failed transactions. | INTEGER | | No | |
| soroban\_max\_refundable\_resource\_fee\_charged | Maximum refundable\_resource\_fee\_charged across Soroban transactions in the ledger. | INTEGER | | No | |
| soroban\_min\_refundable\_resource\_fee\_charged | Minimum refundable\_resource\_fee\_charged across Soroban transactions in the ledger. | INTEGER | | No | |
| soroban\_sum\_resource\_fee\_refund | Sum of resource\_fee\_refund across Soroban transactions. NOTE: Currently broken -- always 0. | INTEGER | | No | |
| soroban\_max\_resource\_fee\_refund | Maximum resource\_fee\_refund across Soroban transactions. NOTE: Currently broken -- always 0. | INTEGER | | No | |
| soroban\_min\_resource\_fee\_refund | Minimum resource\_fee\_refund across Soroban transactions. NOTE: Currently broken -- always 0. | INTEGER | | No | |
| soroban\_sum\_rent\_fee\_charged | Sum of rent\_fee\_charged across Soroban transactions. This is the portion of refundable\_resource\_fee\_charged that went to ledger entry TTL extensions. | INTEGER | | No | |
| soroban\_max\_rent\_fee\_charged | Maximum rent\_fee\_charged across Soroban transactions in the ledger. | INTEGER | | No | |
| soroban\_min\_rent\_fee\_charged | Minimum rent\_fee\_charged across Soroban transactions in the ledger. Will be 0 for ledgers where all Soroban transactions failed. | INTEGER | | No | |
| soroban\_surge\_txn\_count | Number of Soroban transactions in the ledger where inclusion\_fee\_charged exceeded the base fee (100 stroops per operation), indicating surge pricing. | INTEGER | | No | |
| soroban\_surge\_operation\_count | Total operations in Soroban transactions that experienced surge pricing in the ledger. | INTEGER | | No | |
| soroban\_is\_surge\_ledger | True if any Soroban transaction in the ledger experienced surge pricing. | BOOLEAN | | No | |
| closed\_at | Timestamp in UTC when the ledger closed and was committed to the network. Sourced from history\_ledgers. | TIMESTAMP | | No | |
| fee\_pool | The cumulative fee pool balance (in stroops) as of this ledger's close, sourced from history\_ledgers. This is a running total of all transaction fees ever collected by the network, not the fees for this individual ledger. | INTEGER | | No | |
| airflow\_start\_ts | Timestamp when the Airflow DAG run started. Used for pipeline metadata and debugging. | STRING | | No | |
