Google Search Console model

Query performance daily

The Queries tab of the Performance report, by day.

Grain
date_day x site x query
Built from
  1. 1
    Raw tables
  2. 1
    Staging
  3. 1
    Core
  4. 1
    Analytics
Reads from Google Search Console
keyword_site_analytics_web
Ships as
Weld and dbt SQL, open source on GitHub
core.google_search_console.query_performance_daily
1-- core.google_search_console.query_performance_daily
2-- The Queries tab of the Performance report, by day.
3--
4-- Grain: date_day x site x query. Dates are Pacific Time.
5-- Depends on: staging.google_search_console.query_analytics
6--
7-- Aggregated by property, so a query counts once per search even when several of
8-- your pages showed. Anonymized queries are absent, so totals sit below
9-- site_performance_daily. Position is impression-weighted across countries and
10-- devices; re-aggregate with weighted_position_sum, never by averaging.
11
12SELECT
13    date_day,
14    site,
15    query,
16    SUM(clicks)                                              AS clicks,
17    SUM(impressions)                                         AS impressions,
18    SAFE_DIVIDE(SUM(clicks), SUM(impressions))               AS ctr,
19    SAFE_DIVIDE(SUM(position * impressions), SUM(impressions)) AS average_position,
20    SUM(position * impressions)                              AS weighted_position_sum,
21    SUM(IF(device = 'mobile', clicks, 0))                    AS mobile_clicks,
22    SUM(IF(device = 'mobile', impressions, 0))               AS mobile_impressions
23FROM {{staging.google_search_console.query_analytics}}
24GROUP BY 1, 2, 3

This model and the 2 it depends on. Deploy them together; refs like {{staging.…}} resolve to the matching folders in Weld, and the dbt view uses source() and ref().

Notes

How it counts. And where it stops.

Aggregated by property, so a query counts once per search even when several of your pages showed. Anonymized queries are absent, so totals sit below site_performance_daily. Position is impression-weighted across countries and devices; re-aggregate with weighted_position_sum, never by averaging.

Raw tables it reads

  • raw.google_search_console.keyword_site_analytics_web

Put Google Search Console in front
of your agents.

Connect Google Search Console, deploy the models, and ask questions in Claude, Cursor or ChatGPT. Free for 14 days, no credit card.