Query Store Analytics (ShopifyQL)
shopify_analytics_queryRun ShopifyQL queries against Shopify store analytics to retrieve sales, orders, products, or customer metrics as a table. Use it to analyze performance trends by date, product, or other dimensions.
Instructions
Run a ShopifyQL query against the store's analytics and get back a table.
ShopifyQL shape: FROM SHOW [GROUP BY ] [SINCE ] [UNTIL ] [ORDER BY ] [LIMIT n]
Datasets include sales, orders, products, customers.
Examples: FROM sales SHOW total_sales GROUP BY month SINCE -12m ORDER BY month FROM sales SHOW total_sales, orders GROUP BY product_title SINCE -30d ORDER BY total_sales DESC LIMIT 10 FROM orders SHOW average_order_value SINCE -90d
A syntax error is reported as an error, not as an empty table — an empty result genuinely means no matching data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ShopifyQL query, e.g. 'FROM sales SHOW total_sales SINCE -30d' |