ShopifyQL Explained, and Where It Stops
What ShopifyQL is, what it can report on, how a query is built, and the reports it can't produce: row-level order fields, scheduled files and more.
ShopifyQL is Shopify’s query language for its analytics. Every report in the Shopify admin’s Analytics section is a ShopifyQL query underneath, and you can open one, edit the query and save it as your own. It’s included with Shopify.
This guide covers what ShopifyQL does well, how a query is put together, and where it stops.
What ShopifyQL covers
ShopifyQL reads from Shopify’s analytics data, which covers a lot: sales, returns, discounts, taxes, customers, payments and payouts, gift cards, inventory, fulfillments, sessions and marketing, among others. Metafields can be used as dimensions too, once they’re made available to analytics.
For questions like “net sales by product last month” or “sessions by traffic source this week”, ShopifyQL is quick, free and matches Shopify’s other reports, because it is Shopify’s reports.
How a query is built
A ShopifyQL query names its data, then what to show, then how to group and filter it:
FROM sales
SHOW net_sales, orders
GROUP BY product_title
SINCE -30d
ORDER BY net_sales DESC
- FROM picks the dataset, such as sales or sessions.
- SHOW picks the figures.
- GROUP BY splits them by a dimension, such as product or day.
- WHERE filters.
- SINCE, UNTIL and DURING set the period, and COMPARE TO adds a comparison period.
- VISUALIZE chooses the chart.
Recent versions can also combine datasets that share a dimension, such as sales and sessions by day.
Where ShopifyQL stops
ShopifyQL is built for totals over time, and it’s limited to what Shopify’s analytics holds. These are the gaps merchants run into most:
Row-level order details
ShopifyQL reports totals, not lists of orders with any field you like. Line item properties, order notes, note attributes and tags aren’t available to report on. For a list of orders with those fields, you need an order export of some kind.
Scheduled files
You can’t schedule a ShopifyQL report to be emailed as a CSV or Excel file, or sent to SFTP or a spreadsheet, every Monday morning. Someone has to open it and export it.
Joins beyond shared dimensions
Datasets can be combined only on the dimensions they share. You can’t join sales to your own data, or to fields ShopifyQL doesn’t have.
Reports across stores
Reporting across several stores at once is only available on Shopify Plus.
Calculated fields and history snapshots
ShopifyQL supports arithmetic on its figures, but not custom calculated fields beyond that, and it can’t show you how something stood on a past date unless analytics recorded it.
When to reach for something else
If ShopifyQL answers your questions, use it: it’s included and it’s Shopify’s own numbers. When you need row-level order fields, reports emailed on a schedule, or a report written for you from a plain-English question, that’s where a reporting app comes in.
Queryful uses a query language shaped like ShopifyQL, runs on its own copy of your sales and orders, and checks its totals against Shopify’s analytics every night, so the two agree.