Join Search Console Site and URL Data Safely
When you combine the site and URL performance tables in Google Search Console’s BigQuery bulk export, each row already summarizes data. A…
When you download CSV exports from Bing Webmaster Tools’ AI Performance report, two files can both list citation counts while tracking different things. One file’s rows might represent grounding queries (the key phrases Bing uses to pull content it later cites in an AI answer), while another file’s rows represent pages or a mix of report dimensions. Data analysts call the specific thing one row represents its grain.
If the files do not share a documented identifier, your database engine can match a single row in one file to several rows in the other. When it does that, it duplicates the citation counts, so summing them inflates your totals. You can avoid this by loading each export into its own table, checking its actual columns and grain, and joining the files only when the CSVs or Microsoft’s documentation confirm both a shared key and what it means. If they do not, report each file’s totals separately.
Microsoft’s launch description explains how the grounding-query measure works. The report also tracks citations by page and metrics over time, giving you separate views of the same citation activity.
Microsoft’s AI Performance help page lists CSV and Excel exports for grounding queries with citation counts, page citations, and metrics over custom date ranges. However, Microsoft does not publish a fixed list of CSV headers, a versioned schema of column names and data types, or a shared identifier that links the unfiltered query and page exports.
Open the export menu in your report and inspect the headers in the files you download to see the exact field names. Do not assume your file matches an example or a previous export. In June 2026, Microsoft announced preview features including Intents, Topics, Citation Share, and Compare, though it did not confirm that those fields appear in every CSV. The feature announcement defines Citation Share as a percentage for a specific query; it measures that query rather than identifying a row.
Microsoft also documents a Grounding Query–Pages Mapping view. When you select a query, Bing shows its cited pages and citation counts; when you select a page, Bing shows the grounding queries tied to it. You can apply one filter at a time, and the exports reflect whichever filter is active. While this view connects queries to pages, it does not mean the unfiltered summary exports share a common identifier.
Load the query and page CSVs into separate tables before you try to combine them. The filenames, table names, and SQL below are article setup. They show a DuckDB workflow, and Bing did not provide these filenames or outputs.
-- Article setup: illustrative filenames and table names.
CREATE TABLE article_setup_queries AS
SELECT * FROM read_csv('article_setup_grounding_queries.csv');
CREATE TABLE article_setup_pages AS
SELECT * FROM read_csv('article_setup_pages.csv');
DESCRIBE article_setup_queries;
DESCRIBE article_setup_pages;
SELECT * FROM article_setup_queries LIMIT 10;
SELECT * FROM article_setup_pages LIMIT 10;
DuckDB infers headers and data types automatically when it reads a CSV, and DESCRIBE prints the resulting columns. Because a CSV file carries no formal schema, treat those inferred types as a starting point and verify them against the raw headers. You can check the DuckDB CSV import documentation and quickstart for details.
For every file you download, write down the report view, date range, active filter, and column names. Then summarize its grain in one sentence, such as “one row represents one observed query-level record” or “one row represents one observed page-level record.” Check whether phrases or URLs repeat alongside other columns. A phrase or URL can legitimately appear more than once if another column, like the date, changes from row to row. If the report view and headers do not make it clear what a single row represents, leave the grain unresolved instead of guessing an identifier. Keeping a log of your headers also helps when you are detecting changes in export schemas.
A candidate key is a column, or group of columns, that uniquely identifies a row at its stated grain. Check each file for duplicate or missing values in those columns. You also need to verify that matching values mean the same thing and cover the same reporting scope (view, date range, and active filter) in both files. A column that is unique in one table does not automatically match records in another. If you use a composite key, the combined columns must be unique together, even if individual columns repeat, as Microsoft explains in its SQL Server key guidance.
The queries below are article setup. "Grounding Query" and "Page URL" are placeholder labels, not guaranteed Bing headers or recommended join keys. Run a check only if that exact column exists in your file, and swap in your actual header if it differs.
-- Article setup: test whether an observed query column repeats.
SELECT "Grounding Query", COUNT(*) AS rows_per_value
FROM article_setup_queries
GROUP BY "Grounding Query"
HAVING COUNT(*) > 1;
-- Article setup: test whether an observed page column repeats.
SELECT "Page URL", COUNT(*) AS rows_per_value
FROM article_setup_pages
GROUP BY "Page URL"
HAVING COUNT(*) > 1;
If a query returns any rows, that value repeats in the table and cannot uniquely identify a row. If it returns nothing, the value is unique inside that single file, which still does not prove a link between the two files. When no single column is unique, group by the combination of observed columns that might identify a row and test whether that group repeats. Do not add extra columns only to force uniqueness, and do not guess a query-to-page link because two labels look similar. Keep your original CSV downloads untouched while you run these tests.
When you run a one-to-many join, the database repeats a row from the first table once for every matching row in the second table. If that repeated row holds a citation count, summing the column after the join inflates your original total.
In a many-to-many join, the database pairs every matching row on one side with every matching row on the other. For instance, if two rows in one file and three rows in the other share a valid key, the database outputs six row pairs. A query that counts rows includes every repeated pair in its total. Microsoft documents how COUNT and joins behave when values repeat on both sides. You can use COUNT(DISTINCT ...) to count unique values, but it will not fix an inflated SUM(citations).
If your files do share a documented identifier, check how many rows match and which values go unmatched before you sum any totals. Aggregate each table to the level of detail you need first, provided that still answers your question, then compare row counts and sums before and after you join them. Even if you choose a left join to keep every row from the first file, the database still repeats left-side metrics whenever multiple rows match on the right.
If you need to know which pages go with which queries, use the documented Grounding Query–Pages Mapping view and inspect its filtered export. If the exported rows contain both query and page values, store them in their own table and note what one row represents. Do not treat the unfiltered query and page summaries as a substitute for that mapping.
Microsoft notes that the report summarizes sampled activity, and its query and page views can cover slightly different windows within your chosen date range. Because of this, counts for a query-page pair can differ depending on whether you filter the report by query or by page. That mismatch does not mean your join is broken, and forcing the views to line up will not fix it. You can read more about these limits in the mapping and sampling notes.
When the files do not document or expose a shared key or mapping, aggregate each table on its own. Report the query-view and page-view totals side by side, and label each one with its grain, date range, and active filter. Do not merge them into a single citation total or guess which pages belong to which queries.
Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.
Take a look at vroni.com