File tree Expand file tree Collapse file tree
definitions/output/reports Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,36 +5,17 @@ publish('tech_report_technologies', {
55 type : 'table' ,
66 tags : [ 'tech_report' ]
77} ) . query ( ctx => `
8- WITH pages AS (
9- SELECT DISTINCT
10- client,
11- root_page,
12- tech.technology
13- FROM ${ ctx . ref ( 'crawl' , 'pages' ) } AS pages
14- INNER JOIN pages.technologies AS tech
15- WHERE
16- date = '${ pastMonth } '
17- ${ constants . devRankFilter }
18- ),
19-
20- tech_origins AS (
8+ WITH tech_origins AS (
219 SELECT
22- technology,
23- STRUCT(
24- MAX(IF(client = 'desktop', origins, 0)) AS desktop,
25- MAX(IF(client = 'mobile', origins, 0)) AS mobile
26- ) AS origins
27- FROM (
28- SELECT
29- client,
30- technology,
31- COUNT(DISTINCT root_page) AS origins
32- FROM pages
33- GROUP BY
34- client,
35- technology
36- )
37- GROUP BY technology
10+ technology,
11+ adoption AS origins
12+ FROM ${ ctx . ref ( 'reports' , 'tech_report_adoption' ) }
13+ WHERE
14+ date = '${ pastMonth } '
15+ AND rank = 'ALL'
16+ AND geo = 'ALL'
17+ AND version = 'ALL'
18+ ${ constants . devRankFilter }
3819),
3920
4021technologies AS (
@@ -51,14 +32,6 @@ technologies AS (
5132 description,
5233 categories,
5334 icon
54- ),
55-
56- total_pages AS (
57- SELECT
58- client,
59- COUNT(DISTINCT root_page) AS origins
60- FROM pages
61- GROUP BY client
6235)
6336
6437SELECT
@@ -75,16 +48,14 @@ USING(technology)
7548UNION ALL
7649
7750SELECT
78- 'ALL' AS technology,
51+ technology,
7952 NULL AS description,
8053 NULL AS icon,
8154 NULL AS category,
8255 NULL AS category_obj,
83- STRUCT(
84- MAX(IF(client = 'desktop', origins, 0)) AS desktop,
85- MAX(IF(client = 'mobile', origins, 0)) AS mobile
86- ) AS origins
87- FROM total_pages
56+ origins
57+ FROM tech_origins
58+ WHERE technology = 'ALL'
8859` ) . postOps ( ctx => `
8960 SELECT
9061 reports.run_export_job(
You can’t perform that action at this time.
0 commit comments