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

# tron.transactions

> Tron transaction records — sender, recipient, contract calls, fees, and execution results.

export const TableSample = ({tableName, tableSchema}) => <>
    <div className="hidden dark:block">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}&darkMode=true`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
    <div className="dark:hidden">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
  </>;

## Table Description

The `tron.transactions` table contains information about all transactions on the Tron blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more.
Transactions are the fundamental unit of interaction with the Tron blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts.

## Table Schema

| Column                       | Type                                                        | Description                                                                                      |
| ---------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| block\_time                  | timestamp(3)                                                | The exact UTC timestamp when the block containing this transaction was added to the chain        |
| block\_number                | bigint                                                      | The sequential number of the block containing this transaction                                   |
| value                        | uint256                                                     | Amount of TRX sent from sender to recipient, measured in sun (1 TRX = 10^6 sun)                  |
| gas\_limit                   | bigint                                                      | Maximum number of energy units this transaction can consume                                      |
| gas\_price                   | bigint                                                      | Price per unit of energy for this transaction, denominated in sun                                |
| gas\_used                    | bigint                                                      | Actual amount of energy units consumed by this transaction's execution                           |
| max\_fee\_per\_gas           | bigint                                                      | Maximum total amount per energy unit the initiator is willing to pay                             |
| max\_priority\_fee\_per\_gas | bigint                                                      | Maximum additional fee per energy unit the initiator is willing to pay as a tip                  |
| priority\_fee\_per\_gas      | bigint                                                      | Actual additional fee per energy unit paid as a tip                                              |
| nonce                        | bigint                                                      | Sequential number representing the count of transactions sent from the sender's address          |
| index                        | bigint                                                      | Position of this transaction within its containing block                                         |
| success                      | boolean                                                     | Whether the transaction executed successfully (true) or failed (false)                           |
| from                         | varbinary                                                   | Address of the account that initiated and signed this transaction                                |
| to                           | varbinary                                                   | Address of the recipient account or contract for this transaction                                |
| block\_hash                  | varbinary                                                   | Unique identifier (hash) of the block containing this transaction                                |
| data                         | varbinary                                                   | Input data for the transaction, which may include function calls or contract interaction data    |
| hash                         | varbinary                                                   | Unique identifier (hash) of this specific transaction                                            |
| type                         | varchar                                                     | Type of transaction indicating its structure and fee mechanism                                   |
| access\_list                 | array(row(address varbinary, storagekeys array(varbinary))) | List of addresses and storage keys the transaction plans to access, used for energy optimization |
| block\_date                  | date                                                        | The UTC date of the block in which this transaction was included                                 |

## Table Sample

<TableSample tableSchema="tron" tableName="transactions" />

## Examples

### Show all transactions sent by a specific address

```sql theme={null}
select * 
from tron.transactions where "from" = 0x50A1b5c358F8D34F0d35aA2f10742c46054E247e
```

### Count the number of transactions per block

```sql theme={null}
SELECT 
    block_number, 
    COUNT(*)
FROM tron.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10
```

### Show the top 10 transactions with the highest gas price

```sql theme={null}
SELECT 
    hash, 
    gas_price
FROM tron.transactions
ORDER BY gas_price DESC
LIMIT 10
```
