Hi Shopify Dev Community,
I’m facing an issue with shopifyqlQuery in GraphQL and would like to check whether this is expected behavior or if anyone has experienced the same.
Query with date range
When I run this query across multiple days:
{
"query": "query { shopifyqlQuery(query: \"FROM sessions, web_performance, search_queries SHOW sessions, sessions_with_cart_additions, sessions_that_reached_checkout, cls_good_view_count, cls_okay_view_count, search_queries_with_clicks GROUP BY day WITH TOTALS TIMESERIES day SINCE 2026-05-02 UNTIL 2026-05-12 ORDER BY day ASC\") { tableData { columns { name dataType displayName } rows } parseErrors } }"
}
I receive results like this:
{
"day": "2026-05-03",
"sessions": "1280",
"sessions_with_cart_additions": "39",
"sessions_that_reached_checkout": "19",
"cls_good_view_count": "52",
"cls_okay_view_count": "2",
"search_queries_with_clicks": "0",
"sessions__totals": "14357",
"sessions_with_cart_additions__totals": "357",
"sessions_that_reached_checkout__totals": "174",
"cls_good_view_count__totals": "526",
"cls_okay_view_count__totals": "9",
"search_queries_with_clicks__totals": "6"
}
As you can see, the __totals fields are repeated on every row and represent the total for the full date range, not the specific day.
Query for a single day
But when I run the exact same query for only one day:
{
"query": "query { shopifyqlQuery(query: \"FROM sessions, web_performance, search_queries SHOW sessions, sessions_with_cart_additions, sessions_that_reached_checkout, cls_good_view_count, cls_okay_view_count, search_queries_with_clicks GROUP BY day WITH TOTALS TIMESERIES day SINCE 2026-05-03 UNTIL 2026-05-03 ORDER BY day ASC\") { tableData { columns { name dataType displayName } rows } parseErrors } }"
}
I get:
{
"day": "2026-05-03",
"sessions": "1280",
"sessions_with_cart_additions": "39",
"sessions_that_reached_checkout": "19",
"cls_good_view_count": "52",
"cls_okay_view_count": "2",
"search_queries_with_clicks": "0",
"sessions__totals": "1280",
"sessions_with_cart_additions__totals": "39",
"sessions_that_reached_checkout__totals": "19",
"cls_good_view_count__totals": "52",
"cls_okay_view_count__totals": "2",
"search_queries_with_clicks__totals": "0"
}
This looks correct because totals match that single day.
My question
Is this the expected behavior of WITH TOTALS in ShopifyQL?
Should the __totals fields always represent the total of the full queried range and be repeated on every row?
Or is there a better way to retrieve per-day totals without this duplication behavior?
Would appreciate any clarification from the team or community.
Thank you!

