Guides › Database reference › Orders and sales
Magento 2 sales_order_grid table
A flattened copy of each order that powers Sales › Orders in the admin. It's built from sales_order and its addresses and payment.
Key columns
| Column | What it means |
|---|---|
entity_id | The same ID as sales_order.entity_id. |
increment_id | The order number. |
status | The order status code. |
store_id / store_name | Where the order was placed. |
customer_email / customer_name | Copied from the order. |
billing_name / shipping_name | Names from the order's addresses. |
base_grand_total / grand_total | Order totals. |
payment_method | Payment method code. |
Good to know
- It's a copy, not the source. If asynchronous grid indexing is on (setting
dev/grid/async_indexing), new orders appear in the grid only after cron runs. - An order missing from the admin grid but present in
sales_orderusually means cron isn't running or the grid needs reindexing.
Example: Orders that are missing from the admin order grid
Works on Magento Open Source and Adobe Commerce.
SELECT o.entity_id, o.increment_id, o.created_at
FROM sales_order o
LEFT JOIN sales_order_grid g ON g.entity_id = o.entity_id
WHERE g.entity_id IS NULL
ORDER BY o.entity_id DESC;
Tested on Magento Open Source and Adobe Commerce 2.4.8. Read-only. If your tables have a prefix, add it to each table name.
Extra columns on Adobe Commerce
Adobe Commerce has 29 columns here instead of 28. The extra ones come from these Commerce features:
- Customer Balance:
refunded_to_store_credit
All 28 columns (Magento Open Source)
Show all columns
| Column | Type | Can be empty | Magento's description |
|---|---|---|---|
entity_id | int(10) unsigned | Entity ID | |
status | varchar(32) | yes | Status |
store_id | smallint(5) unsigned | yes | Store ID |
store_name | varchar(255) | yes | Store Name |
customer_id | int(10) unsigned | yes | Customer ID |
base_grand_total | decimal(20,4) | yes | Base Grand Total |
base_total_paid | decimal(20,4) | yes | Base Total Paid |
grand_total | decimal(20,4) | yes | Grand Total |
total_paid | decimal(20,4) | yes | Total Paid |
increment_id | varchar(50) | yes | Increment ID |
base_currency_code | varchar(3) | yes | Base Currency Code |
order_currency_code | varchar(255) | yes | Order Currency Code |
shipping_name | varchar(255) | yes | Shipping Name |
billing_name | varchar(255) | yes | Billing Name |
created_at | timestamp | yes | Created At |
updated_at | timestamp | yes | Updated At |
billing_address | varchar(255) | yes | Billing Address |
shipping_address | varchar(255) | yes | Shipping Address |
shipping_information | varchar(255) | yes | Shipping Method Name |
customer_email | varchar(255) | yes | Customer Email |
customer_group | varchar(255) | yes | Customer Group |
subtotal | decimal(20,4) | yes | Subtotal |
shipping_and_handling | decimal(20,4) | yes | Shipping and handling amount |
customer_name | varchar(255) | yes | Customer Name |
payment_method | varchar(255) | yes | Payment Method |
total_refunded | decimal(20,4) | yes | Total Refunded |
pickup_location_code | varchar(255) | yes | Pickup Location Code |
dispute_status | varchar(45) | yes | Braintree Dispute Status |