From 61ff3c00c59fc5e0ccf6e9d7c258df778906d163 Mon Sep 17 00:00:00 2001 From: Eduardo Filho Date: Mon, 17 Nov 2025 10:31:24 -0500 Subject: [PATCH] Generate SQL popup shows same query as STMO --- src/data/gleanSql.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/data/gleanSql.js b/src/data/gleanSql.js index 99a4f3766..f9b24c4be 100644 --- a/src/data/gleanSql.js +++ b/src/data/gleanSql.js @@ -1,15 +1,26 @@ export const getGleanQuery = (columnName, table) => ` --- Auto-generated by the Glean Dictionary. +-- Auto-generated by Glean Dictionary. -- https://docs.telemetry.mozilla.org/cookbooks/accessing_glean_data.html#accessing-glean-data-in-bigquery SELECT ${columnName} + /* Uncomment this and the next block to segment by locale + ,client_info.locale, + COUNT(*) AS count + */ FROM ${table} AS m WHERE -- Pick yesterday's data from stable/historical tables. -- https://docs.telemetry.mozilla.org/cookbooks/bigquery/querying.html#table-layout-and-naming DATE(submission_timestamp) = DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY) + AND ${columnName} IS NOT NULL +/* Uncomment this and the previous commented block to segment by locale +GROUP BY + ${columnName}, + client_info.locale + ORDER BY COUNT DESC +*/ -- IMPORTANT: Remove the limit clause when the query is ready. LIMIT 10`;