From d5cb0827f17927dd43d9445abcf69c2b4098f531 Mon Sep 17 00:00:00 2001 From: Adam Murphy Date: Mon, 24 Aug 2020 14:41:35 +0300 Subject: [PATCH 1/7] Five sql queries for google_search_console --- google-search-console/.DS_Store | Bin 0 -> 6148 bytes .../queries/avg_search_vol_last_4_weeks.md | 28 ++++++++++++ .../queries/top_100_pages_last_7_days.md | 33 ++++++++++++++ .../top_20_most_improved_queries_wow.md | 43 ++++++++++++++++++ .../queries/top_20_worsened_queries_wow.md | 43 ++++++++++++++++++ .../queries/top_5_queries_per_page.md | 38 ++++++++++++++++ 6 files changed, 185 insertions(+) create mode 100644 google-search-console/.DS_Store create mode 100644 google-search-console/queries/avg_search_vol_last_4_weeks.md create mode 100644 google-search-console/queries/top_100_pages_last_7_days.md create mode 100644 google-search-console/queries/top_20_most_improved_queries_wow.md create mode 100644 google-search-console/queries/top_20_worsened_queries_wow.md create mode 100644 google-search-console/queries/top_5_queries_per_page.md diff --git a/google-search-console/.DS_Store b/google-search-console/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ec9d4da7adf10354b5d1f8d5925a02313b6f430f GIT binary patch literal 6148 zcmeHKJ5Iwu5SmKAUDq9N zH~dEi`0h^VfmXP=M@sImS|;25*{#VOY$H365mBwR1Sm swGny+WnsTYaT|h;q+
  • Change date range: In the WHERE clause, change `'4 weeks'` to `'N weeks'` to get the average search volume for the last N weeks (for some whole number N)
  • Any daily total/average: Aggregate different columns to get different daily totals/averages e.g. `SUM(clicks)` gives you the total number of clicks your site has received on each day over the last 4 weeks.
  • Alternate day ordering: If you want the week to begin on Sunday, change the first column in the `SELECT` statement to `TO_CHAR(date, 'D')`. The current form is `'ID'` which stands for 'International Date'. This is the ISO 8601 international date time format which has weeks begin on Monday.
  • + +```sql +SELECT + TO_CHAR(date, 'ID') AS day_number, + TO_CHAR(date, 'Day') AS day_of_week, + SUM(clicks/impressions) AS avg_search_vol +FROM google_search_console_blog +WHERE date >= current_date - interval '4 weeks' +GROUP BY + day_number, + day_of_week +ORDER BY day_number +``` + +## Query Results Dictionary +Column | Description +---|--- +`day_number`| The day of the week as a number. Day 1 corresponds to Monday. We need this to order the results correctly (otherwise, the results would be ordered alphabetically). +`day_of_week`| The day of the week. +`avg_search_vol`| The average amount of traffic brought to your website through search on each day of the week. diff --git a/google-search-console/queries/top_100_pages_last_7_days.md b/google-search-console/queries/top_100_pages_last_7_days.md new file mode 100644 index 0000000..62f43e7 --- /dev/null +++ b/google-search-console/queries/top_100_pages_last_7_days.md @@ -0,0 +1,33 @@ +# Top 100 Pages in Last 7 Days + +Instructions | Details +---|--- +Description | Display the top 100 most clicked pages on your site in the last seven days. Plus, other useful statistics. +Requirements | Collect the Panoply Google Search Console data source with the default set of metrics and dimensions. Dimensions used: `date` and `page`. Metrics used: `clicks`, `ctr`, `position`, and `impressions`. +Usage | Create a table to see the most fundamental statistics for the top-performing pages on your site. Track these statistics over time using a bar or line chart. +Modifications |
    • Custom date range: In the `WHERE` clause, change `'7 days`' to `'N days'` to display the top 100 pages in the last N days, for some whole number N.
    • Custom number of pages: In the `ORDER BY` clause, change `LIMIT 100` to `LIMIT N` to show the top N pages, for some whole number N.
    • Simplified view: To just see the pages and the total number of clicks, only include the first two colums in the `SELECT` statement.
    + + +```sql +SELECT + page, + SUM(clicks) AS total_clicks, + SUM(impressions) AS total_impressions, + SUM(ctr * impressions) / SUM(impressions) AS weighted_average_ctr, + SUM(position * impressions) / SUM(impressions) AS weighted_average_rank, + SUM(impressions - clicks) AS missed_opportunity +FROM google_search_console_blog +WHERE date > current_date - interval '7 days' +GROUP BY page +ORDER BY total_clicks DESC LIMIT 100; +``` + +## Query Results Dictionary +Column | Description +---|--- +`page`| The page on your site appearing in search results. +`total_clicks`| The number times this page was clicked in the last seven days. +`total_impressions` | The number of times this page was displayed in Google search results over the last seven days. +`weighted_average_ctr` | The average click-through rate for this page in the last seven days. +`weighted_average_rank`| The average position this page appeared in the last seven days in Google's search results. +`missed_opportunity`| The number of impressions minus the number of clicks i.e., the number of times the page was seen and not clicked. Pages with a high number of missed opportunities would be excellent targets for increasing your organic search traffic (they are already ranking well, but not many people are clicking through. Why might this be?). \ No newline at end of file diff --git a/google-search-console/queries/top_20_most_improved_queries_wow.md b/google-search-console/queries/top_20_most_improved_queries_wow.md new file mode 100644 index 0000000..69376ef --- /dev/null +++ b/google-search-console/queries/top_20_most_improved_queries_wow.md @@ -0,0 +1,43 @@ +# Top 20 Most Improved Queries Week on Week + +Instructions | Details +---|--- +Description | Display the top 20 queries with the most significant increase in average position over the last week. +Requirements | Collect the Panoply Google Search Console data source with the default set of metrics and dimensions. Dimensions used: `date`. Metrics used: `query`, `position`, and `impressions`. +Usage | Create a table or bar chart to see which queries have improved the most week on week. +Modifications |
    • Custom date range: In all `WHERE` clauses, change `'7 days'` to `'14 days'` and `'14 days'` to `'28 days'` to see the best performing queries fortnight on fortnight.
    • Custom number of queries: Change the `ORDER BY` clause from `LIMIT 20` to `LIMIT N` to see the top N performing queries week on week, for some whole number N.
    + +```sql +SELECT + last7.query AS query, + last7.avg_pos AS last_7_avg_pos, + prev7.avg_pos AS prev_7_avg_pos, + prev7.avg_pos - last7.avg_pos AS difference +FROM + (SELECT + query, + SUM(position * impressions) / SUM(impressions) AS avg_pos + FROM google_search_console_blog + WHERE date < current_date -- This is the 'last 7' days + AND date >= current_date - interval '7 days' + GROUP BY query) AS last7 +INNER JOIN + (SELECT + query, + SUM(position * impressions) / SUM(impressions) AS avg_pos + FROM google_search_console_blog + + WHERE date < current_date - interval '7 days' -- This is the 'previous 7' days + AND date >= current_date - interval '14 days' + GROUP BY query) AS prev7 + ON last7.query = prev7.query +ORDER BY difference DESC LIMIT 20; +``` + +## Query Results Dictionary +Column | Description +---|--- +`query`| The search term typed into Google that your page(s) have ranked for. +`last_7_avg_pos`| The average position for that query over the last seven days. +`prev_7_avg_pos`| The average position for that query over the previous seven days. +`difference`| The change in average position week on week. A positive number means an increase in position and that the query ranks closer to #1. For example, if a page ranked #40 in the previous week and #5 last week, the difference is 40 - 5 = 35. Thus the page has increased its position by 35. diff --git a/google-search-console/queries/top_20_worsened_queries_wow.md b/google-search-console/queries/top_20_worsened_queries_wow.md new file mode 100644 index 0000000..42797a5 --- /dev/null +++ b/google-search-console/queries/top_20_worsened_queries_wow.md @@ -0,0 +1,43 @@ +# Top 20 Worsened Queries Week on Week + +Instructions | Details +---|--- +Description | Display the top 20 queries with the most significant decrease in average position over the last week. +Requirements | Collect the Panoply Google Search Console data source with the default set of metrics and dimensions. Dimensions used: `date`. Metrics used: `query`, `position`, and `impressions`. +Usage | Create a table or bar chart to see which queries have worsened the most week on week. +Modifications |
    • Custom date range: In all `WHERE` clauses, change `'7 days'` to `'14 days'` and `'14 days'` to `'28 days'` to see the worst performing queries fortnight on fortnight.
    • Custom number of queries: Change the `ORDER BY` clause from `LIMIT 20` to `LIMIT N` to see the top N worst performing queries week on week, for some whole number N.
    + +```sql +SELECT + last7.query, + last7.avg_pos AS last_7_avg_pos, + prev7.avg_pos AS prev_7_avg_pos, + prev7.avg_pos - last7.avg_pos AS difference +FROM + (SELECT + query, + SUM(position * impressions) / SUM(impressions) AS avg_pos + FROM google_search_console_blog + WHERE date < current_date -- This is the 'last 7' days + AND date >= current_date - interval '7 days' + GROUP BY query) AS last7 +INNER JOIN + (SELECT + query, + SUM(position * impressions) / SUM(impressions) AS avg_pos + FROM google_search_console_blog + + WHERE date < current_date - interval '7 days' -- This is the 'previous 7' days + AND date >= current_date - interval '14 days' + GROUP BY query) AS prev7 + ON last7.query = prev7.query +ORDER BY difference ASC LIMIT 20; +``` + +## Query Results Dictionary +Column | Description +---|--- +`query`| The search term typed into Google that your page(s) have ranked for. +`last_7_avg_pos`| The average position for that query over the last seven days. +`prev_7_avg_pos`| The average position for that query over the previous seven days. +`difference`| The change in average position week on week. A negative number means a decrease in position and that the query ranks further away from #1. For example, if a page ranked #5 in the previous week and #40 last week, the difference is 5 - 40 = -35. Thus the page has decreased its position by 35. diff --git a/google-search-console/queries/top_5_queries_per_page.md b/google-search-console/queries/top_5_queries_per_page.md new file mode 100644 index 0000000..b8785d5 --- /dev/null +++ b/google-search-console/queries/top_5_queries_per_page.md @@ -0,0 +1,38 @@ +# Top 5 Most Clicked Queries Per Page In The Last 28 days (Top 100 Pages) + +Instructions | Details +---|--- +Description | For each of the top 100 pages on your site, this query finds the top 5 most clicked queries, and the number of clicks they generated in the last 28 days. +Requirements | Collect the Panoply Google Search Console data source with the default set of metrics and dimensions. Dimensions used: `date`, `page`, `query`. Metrics used: `clicks`. +Usage | Create a table to see which keywords rank highly and bring in traffic for each page. +Modifications |
    • Custom number of queries: In the final `FROM` statement, change `WHERE rank <= 5` to `WHERE rank <= N` to get the top N best performing queries per page, for some whole number N.
    • Custom date range: Change the first `WHERE` clause to `WHERE date > current_date - interval 'N days'` to get the top 5 best performing queries in the last N days, for some whole number N.
    • Worst performing queries: Get the top 100 worst performing queries and pages by changing the ORDER BY clause to `ORDER BY total_clicks ASC`.
    + +```sql +WITH page_info AS( + SELECT + page, + query, + SUM(clicks) AS total_clicks, + ROW_NUMBER() OVER(PARTITION BY page ORDER BY total_clicks DESC) AS rank + FROM google_search_console_blog + WHERE date > current_date - interval '28 days' + GROUP BY 1, 2 + ORDER BY page, total_clicks DESC) +--------------------- +SELECT DISTINCT + page, + LISTAGG(query, ', ') OVER(PARTITION BY page) AS top_5_queries, + SUM(total_clicks) OVER(PARTITION BY page) AS total_clicks +FROM (SELECT * + FROM page_info + WHERE rank <= 5) +ORDER BY total_clicks DESC +LIMIT 100; +``` + +## Query Results Dictionary +Column | Description +---|--- +`page`| The page on your site appearing in search results. +`top_5_queries`| The five queries that have generated the most clicks for this page in the last 28 days. +`total_clicks`| The sum of all the clicks that the five queries generated for this page in the previous 28 days. From 719c780c921b2522fec56229358ed779fc022687 Mon Sep 17 00:00:00 2001 From: Adam Murphy Date: Mon, 24 Aug 2020 18:58:01 +0300 Subject: [PATCH 2/7] Top 5 first appearance queries write-up --- ...appearance_queries_per_page_last_7_days.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 google-search-console/queries/top_5_first_appearance_queries_per_page_last_7_days.md diff --git a/google-search-console/queries/top_5_first_appearance_queries_per_page_last_7_days.md b/google-search-console/queries/top_5_first_appearance_queries_per_page_last_7_days.md new file mode 100644 index 0000000..999596f --- /dev/null +++ b/google-search-console/queries/top_5_first_appearance_queries_per_page_last_7_days.md @@ -0,0 +1,42 @@ +# Top 5 Most Clicked "First Appearance" Queries Per Page In The Last 7 Days (Top 100 Pages) + +Instructions | Details +---|--- +Description |
    • Display the top 100 pages with the most clicks generated by "first appearance" queries in the last seven days. For each page, also display the five "first appearance" queries that generated the clicks.
    • We define a "first appearance" query as a query that has position ≤ 30 this week and has never had position ≤ 30 before. It may or may not have clicks, but will at least have one impression.
    • "First appearance" queries have an upward trajectory. So, by optimizing your pages for these keywords, it is possible to increase your search traffic.
    • Note: since not every page on your site will have five "first appearance" queries each week, this query will not always return 100 pages accompanied by five queries. Nor will each page always have five queries, they may have less than that.
    +Requirements | Collect the Panoply Google Search Console data source with the default set of metrics and dimensions. Dimensions used: `date`, `page`, and `query`. Metrics used: `clicks` and `position`. +Usage | Create a table to see which new keywords pages are ranking for each week. Create a bar or line chart to show how many more keywords each page ranks for over time. +Modifications |
    • Custom number of queries: In the final `FROM` statement, change `WHERE rank <= 5` to `WHERE rank <= N` to get the top N most clicked "first appearance" queries per page, for some whole number N.
    • Custom date range: Change all instances of `'7 days'` to `'N days'` to get the top 5 most clicked "first appearance" queries in the last N days, for some whole number N.
    + +```sql +WITH first_appearance_queries AS( + SELECT + page, + query, + SUM(clicks) AS total_clicks, + ROW_NUMBER() OVER(PARTITION BY page ORDER BY total_clicks DESC) AS rank + FROM google_search_console_blog + WHERE date >= current_date - interval '7 days' + AND position <= 30 + AND query IN (SELECT query + FROM google_search_console_blog + WHERE date < current_date - interval '7 days' + AND position > 30) + GROUP BY 1, 2 + ORDER BY page, total_clicks DESC) +SELECT DISTINCT + page, + LISTAGG(query, ', ') OVER(PARTITION BY page) AS top_5_queries, + SUM(total_clicks) OVER(PARTITION BY page) AS total_clicks +FROM (SELECT * + FROM first_appearance_queries + WHERE rank <= 5) +ORDER BY total_clicks DESC +LIMIT 100; +``` + +## Query Results Dictionary +Column | Description +---|--- +`page`| The page on your site appearing in search results. +`top_5_queries`| The five 'first appearance' queries that have generated the most clicks for this page in the last seven days. +`total_clicks`| The sum of all the clicks that the five queries generated for this page in the last seven days. \ No newline at end of file From 0606b8ddfd8481f24c3d78f9cb323f65b435722b Mon Sep 17 00:00:00 2001 From: Adam Murphy <51246969+theadammurphy@users.noreply.github.com> Date: Tue, 1 Sep 2020 17:42:30 +0300 Subject: [PATCH 3/7] Update google-search-console/queries/avg_search_vol_last_4_weeks.md Co-authored-by: alonbrody --- google-search-console/queries/avg_search_vol_last_4_weeks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-search-console/queries/avg_search_vol_last_4_weeks.md b/google-search-console/queries/avg_search_vol_last_4_weeks.md index ef4887c..fd52b30 100644 --- a/google-search-console/queries/avg_search_vol_last_4_weeks.md +++ b/google-search-console/queries/avg_search_vol_last_4_weeks.md @@ -11,7 +11,7 @@ Modifications |
    • Change date range: In the WHERE clause, change ` SELECT TO_CHAR(date, 'ID') AS day_number, TO_CHAR(date, 'Day') AS day_of_week, - SUM(clicks/impressions) AS avg_search_vol + AVG(clicks*1.00/impressions) AS avg_search_vol FROM google_search_console_blog WHERE date >= current_date - interval '4 weeks' GROUP BY From 3b67dc8c20fb4b803142b842c727befd5ed0ceb4 Mon Sep 17 00:00:00 2001 From: Adam Murphy <51246969+theadammurphy@users.noreply.github.com> Date: Tue, 6 Oct 2020 11:37:44 +0300 Subject: [PATCH 4/7] Removed `day_number` from final result --- .../queries/avg_search_vol_last_4_weeks.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/google-search-console/queries/avg_search_vol_last_4_weeks.md b/google-search-console/queries/avg_search_vol_last_4_weeks.md index fd52b30..c0a3b83 100644 --- a/google-search-console/queries/avg_search_vol_last_4_weeks.md +++ b/google-search-console/queries/avg_search_vol_last_4_weeks.md @@ -8,21 +8,20 @@ Usage | Create a bar chart showing which days bring the most traffic. Highlight Modifications |
      • Change date range: In the WHERE clause, change `'4 weeks'` to `'N weeks'` to get the average search volume for the last N weeks (for some whole number N)
      • Any daily total/average: Aggregate different columns to get different daily totals/averages e.g. `SUM(clicks)` gives you the total number of clicks your site has received on each day over the last 4 weeks.
      • Alternate day ordering: If you want the week to begin on Sunday, change the first column in the `SELECT` statement to `TO_CHAR(date, 'D')`. The current form is `'ID'` which stands for 'International Date'. This is the ISO 8601 international date time format which has weeks begin on Monday.
      ```sql -SELECT - TO_CHAR(date, 'ID') AS day_number, - TO_CHAR(date, 'Day') AS day_of_week, - AVG(clicks*1.00/impressions) AS avg_search_vol -FROM google_search_console_blog -WHERE date >= current_date - interval '4 weeks' -GROUP BY - day_number, - day_of_week +SELECT day_of_week, + avg_search_vol +FROM (SELECT TO_CHAR(DATE,'ID') AS day_number, + TO_CHAR(DATE,'Day') AS day_of_week, + AVG(clicks*1.00 / impressions) AS avg_search_vol + FROM google_search_console_blog + WHERE DATE>= CURRENT_DATE-INTERVAL '4 weeks' + GROUP BY day_number, + day_of_week) ORDER BY day_number ``` ## Query Results Dictionary Column | Description ---|--- -`day_number`| The day of the week as a number. Day 1 corresponds to Monday. We need this to order the results correctly (otherwise, the results would be ordered alphabetically). `day_of_week`| The day of the week. `avg_search_vol`| The average amount of traffic brought to your website through search on each day of the week. From 69900ba7403db87cfeeacb9e742959db1c9e6f64 Mon Sep 17 00:00:00 2001 From: Adam Murphy <51246969+theadammurphy@users.noreply.github.com> Date: Tue, 6 Oct 2020 11:45:37 +0300 Subject: [PATCH 5/7] Changed names to `this_week` and `last_week` --- .../top_20_most_improved_queries_wow.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/google-search-console/queries/top_20_most_improved_queries_wow.md b/google-search-console/queries/top_20_most_improved_queries_wow.md index 69376ef..361b45a 100644 --- a/google-search-console/queries/top_20_most_improved_queries_wow.md +++ b/google-search-console/queries/top_20_most_improved_queries_wow.md @@ -9,28 +9,28 @@ Modifications |
      • Custom date range: In all `WHERE` clauses, change ```sql SELECT - last7.query AS query, - last7.avg_pos AS last_7_avg_pos, - prev7.avg_pos AS prev_7_avg_pos, - prev7.avg_pos - last7.avg_pos AS difference + this_week.query AS query, + this_week.avg_pos AS this_week_avg_pos, + last_week.avg_pos AS last_week_avg_pos, + last_week.avg_pos - this_week.avg_pos AS difference FROM (SELECT query, SUM(position * impressions) / SUM(impressions) AS avg_pos FROM google_search_console_blog - WHERE date < current_date -- This is the 'last 7' days + WHERE date < current_date AND date >= current_date - interval '7 days' - GROUP BY query) AS last7 + GROUP BY query) AS this_week INNER JOIN (SELECT query, SUM(position * impressions) / SUM(impressions) AS avg_pos FROM google_search_console_blog - WHERE date < current_date - interval '7 days' -- This is the 'previous 7' days + WHERE date < current_date - interval '7 days' AND date >= current_date - interval '14 days' - GROUP BY query) AS prev7 - ON last7.query = prev7.query + GROUP BY query) AS last_week + ON this_week.query = last_week.query ORDER BY difference DESC LIMIT 20; ``` @@ -38,6 +38,6 @@ ORDER BY difference DESC LIMIT 20; Column | Description ---|--- `query`| The search term typed into Google that your page(s) have ranked for. -`last_7_avg_pos`| The average position for that query over the last seven days. -`prev_7_avg_pos`| The average position for that query over the previous seven days. -`difference`| The change in average position week on week. A positive number means an increase in position and that the query ranks closer to #1. For example, if a page ranked #40 in the previous week and #5 last week, the difference is 40 - 5 = 35. Thus the page has increased its position by 35. +`this_week_avg_pos`| The average position for that query this week. +`last_week_avg_pos`| The average position for that query last week. +`difference`| The change in average position week on week. A positive number means an increase in position and that the query ranks closer to #1. For example, if a page ranked #40 last week and #5 this week, the difference is 40 - 5 = 35. Thus the page has increased its position by 35. From 96c468a58b56c458180d0f5f45e76b9b0c0ed545 Mon Sep 17 00:00:00 2001 From: Adam Murphy <51246969+theadammurphy@users.noreply.github.com> Date: Tue, 6 Oct 2020 11:51:26 +0300 Subject: [PATCH 6/7] Changed names to `this_week` and `last_week` --- .../queries/top_20_worsened_queries_wow.md | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/google-search-console/queries/top_20_worsened_queries_wow.md b/google-search-console/queries/top_20_worsened_queries_wow.md index 42797a5..2d2404c 100644 --- a/google-search-console/queries/top_20_worsened_queries_wow.md +++ b/google-search-console/queries/top_20_worsened_queries_wow.md @@ -2,35 +2,34 @@ Instructions | Details ---|--- -Description | Display the top 20 queries with the most significant decrease in average position over the last week. +Description | Display the top 20 queries with the most significant decrease in average position week on week. Requirements | Collect the Panoply Google Search Console data source with the default set of metrics and dimensions. Dimensions used: `date`. Metrics used: `query`, `position`, and `impressions`. Usage | Create a table or bar chart to see which queries have worsened the most week on week. Modifications |
        • Custom date range: In all `WHERE` clauses, change `'7 days'` to `'14 days'` and `'14 days'` to `'28 days'` to see the worst performing queries fortnight on fortnight.
        • Custom number of queries: Change the `ORDER BY` clause from `LIMIT 20` to `LIMIT N` to see the top N worst performing queries week on week, for some whole number N.
        ```sql SELECT - last7.query, - last7.avg_pos AS last_7_avg_pos, - prev7.avg_pos AS prev_7_avg_pos, - prev7.avg_pos - last7.avg_pos AS difference + this_week.query, + this_week.avg_pos AS this_week_avg_pos, + last_week.avg_pos AS last_week_avg_pos, + last_week.avg_pos - this_week.avg_pos AS difference FROM (SELECT query, SUM(position * impressions) / SUM(impressions) AS avg_pos FROM google_search_console_blog - WHERE date < current_date -- This is the 'last 7' days + WHERE date < current_date AND date >= current_date - interval '7 days' - GROUP BY query) AS last7 + GROUP BY query) AS this_week INNER JOIN (SELECT query, SUM(position * impressions) / SUM(impressions) AS avg_pos FROM google_search_console_blog - - WHERE date < current_date - interval '7 days' -- This is the 'previous 7' days + WHERE date < current_date - interval '7 days' AND date >= current_date - interval '14 days' - GROUP BY query) AS prev7 - ON last7.query = prev7.query + GROUP BY query) AS last_week + ON this_week.query = last_week.query ORDER BY difference ASC LIMIT 20; ``` @@ -38,6 +37,6 @@ ORDER BY difference ASC LIMIT 20; Column | Description ---|--- `query`| The search term typed into Google that your page(s) have ranked for. -`last_7_avg_pos`| The average position for that query over the last seven days. -`prev_7_avg_pos`| The average position for that query over the previous seven days. -`difference`| The change in average position week on week. A negative number means a decrease in position and that the query ranks further away from #1. For example, if a page ranked #5 in the previous week and #40 last week, the difference is 5 - 40 = -35. Thus the page has decreased its position by 35. +`this_week_avg_pos`| The average position for that query this week. +`last_week_avg_pos`| The average position for that query last week. +`difference`| The change in average position week on week. A negative number means a decrease in position and that the query ranks further away from #1. For example, if a page ranked #5 last week and #40 this week, the difference is 5 - 40 = -35. Thus, the page has decreased its position by 35. From ee696e3754920f70389b67114e17bdcff7da81cb Mon Sep 17 00:00:00 2001 From: Adam Murphy <51246969+theadammurphy@users.noreply.github.com> Date: Tue, 6 Oct 2020 11:54:01 +0300 Subject: [PATCH 7/7] Added 'AS query' to line 12 --- google-search-console/queries/top_20_worsened_queries_wow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-search-console/queries/top_20_worsened_queries_wow.md b/google-search-console/queries/top_20_worsened_queries_wow.md index 2d2404c..bfab731 100644 --- a/google-search-console/queries/top_20_worsened_queries_wow.md +++ b/google-search-console/queries/top_20_worsened_queries_wow.md @@ -9,7 +9,7 @@ Modifications |
        • Custom date range: In all `WHERE` clauses, change ```sql SELECT - this_week.query, + this_week.query AS query, this_week.avg_pos AS this_week_avg_pos, last_week.avg_pos AS last_week_avg_pos, last_week.avg_pos - this_week.avg_pos AS difference