Pricing system table reference
This article provides you with an overview of the pricing system table, including the schema and example queries. The pricing table gives you access to a historical log of SKU pricing. A record gets added each time there is a change to a SKU price. These logs can help you perform cost analysis and monitor pricing changes.
Table path: This system table is located at system.billing.list_prices
.
Pricing table schema
The pricing system table uses the following schema:
Column name |
Data type |
Description |
Example |
---|---|---|---|
|
timestamp |
The time this price became effective in UTC |
|
|
timestamp |
The time this price stopped being effective in UTC |
|
|
string |
ID of the account this report was generated for |
|
|
string |
Name of the SKU |
|
|
string |
Name of the Cloud this price is applicable to. Possible values are |
|
|
string |
The currency this price is expressed in |
|
|
string |
The unit of measurement that is monetized. |
|
|
struct |
A structured data field that includes pricing info at the published list price rate. The key |
|
Sample queries
You can use the following sample queries to answer common questions about SKU pricing:
For examples queries concerning job cost observability, see Monitor job costs & performance with system tables.
Find the list price of a particular SKU on a particular date
Since the table only contains records for times when the SKU price changes, you have to look up the most recent price change on or before the date.
SELECT sku_name, price_start_time, pricing.default
FROM system.billing.list_prices
WHERE sku_name = 'STANDARD_ALL_PURPOSE_COMPUTE'
AND price_start_time <= "2023-01-01"
ORDER BY price_start_time DESC
LIMIT 1
View prices that have changed between months
SELECT sku_name, price_start_time, pricing.default
FROM system.billing.list_prices
WHERE price_start_time BETWEEN "2023-05-01" AND "2023-07-01"