ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
Splitgraph Google Sheets extension demo

Query splitgraph data sets from Google Sheets with the free extension.
2
For installation and basic usage instructions, check out the short youtube video.
3
This sheet uses two queries: one to get the list of permit types, and another one to query the montly permits issued for the type selected in the dropdown at B6.
4
The results of the second query are converted just like in the "New construction" tab.
5
The "neumark/city-of-miami:latest"."building_permits_issued_by_city_of_miami_from_2014_7ey5_m434" repository can also be queried on splitgraph.com.
6
Type of permitNEW CONSTRUCTION
← This dropdown was created by querying all permit types and then using Data → Data Validation to only allow the resulting values in cell B6.
7
8
Types of construction work query-- Query to get types of construction for dropdown
SELECT DISTINCT scopeofwork
FROM "neumark/city-of-miami:latest"."building_permits_issued_by_city_of_miami_from_2014_7ey5_m434"
9
Permit count by month query-- Query to get the monthly count of the type of construction permit requested.
-- $CONSTRUCTION_TYPE is SUBSTITUTE()-ed with the actual type of construction before the
-- query is passed to the sgr() function.

SELECT
DATE_TRUNC('month', planaccepteddate) as year_month,
count(0) as total_count
FROM
"neumark/city-of-miami:latest"."building_permits_issued_by_city_of_miami_from_2014_7ey5_m434"
WHERE scopeofwork = '$CONSTRUCTION_TYPE'
GROUP BY year_month
ORDER BY year_month
10
11
types of constructionRaw SQL results
Converted values
12
#ERROR!datetotal_countdatetotal_count
13
#ERROR!#ERROR!0
14
#VALUE!0
15
#VALUE!0
16
#VALUE!0
17
#VALUE!0
18
#VALUE!0
19
#VALUE!0
20
#VALUE!0
21
#VALUE!0
22
#VALUE!0
23
#VALUE!0
24
#VALUE!0
25
#VALUE!0
26
#VALUE!0
27
#VALUE!0
28
#VALUE!0
29
#VALUE!0
30
#VALUE!0
31
#VALUE!0
32
#VALUE!0
33
#VALUE!0
34
#VALUE!0
35
#VALUE!0
36
#VALUE!0
37
#VALUE!0
38
#VALUE!0
39
#VALUE!0
40
#VALUE!0
41
#VALUE!0
42
#VALUE!0
43
#VALUE!0
44
#VALUE!0
45
#VALUE!0
46
#VALUE!0
47
#VALUE!0
48
#VALUE!0
49
#VALUE!0
50
#VALUE!0
51
#VALUE!0
52
#VALUE!0
53
#VALUE!0
54
#VALUE!0
55
#VALUE!0
56
#VALUE!0
57
#VALUE!0
58
#VALUE!0
59
#VALUE!0
60
#VALUE!0
61
#VALUE!0
62
#VALUE!0
63
#VALUE!0
64
#VALUE!0
65
#VALUE!0
66
#VALUE!0
67
#VALUE!0
68
#VALUE!0
69
#VALUE!0
70
#VALUE!0
71
#VALUE!0
72
#VALUE!0
73
#VALUE!0
74
#VALUE!0
75
#VALUE!0
76
#VALUE!0
77
#VALUE!0
78
#VALUE!0
79
#VALUE!0
80
#VALUE!0
81
#VALUE!0
82
#VALUE!0
83
#VALUE!0
84
#VALUE!0
85
#VALUE!0
86
#VALUE!0
87
#VALUE!0
88
#VALUE!0
89
#VALUE!0
90
#VALUE!0
91
#VALUE!0
92
#VALUE!0
93
#VALUE!0
94
#VALUE!0
95
#VALUE!0
96
#VALUE!0
97
#VALUE!0
98
#VALUE!0
99
#VALUE!0
100
#VALUE!0