-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataExplorationQueries.sql
More file actions
71 lines (40 loc) · 1.17 KB
/
DataExplorationQueries.sql
File metadata and controls
71 lines (40 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
"PO BOX 1341 SCAPPOOSE OR 97056" from fins, zip column :"97056"
13082
select *
from fins
where
"Contributor_Payee_Committee_ID" = '13082'
select * from comms
select *
from fins
where "Sub_Type" = 'Cash Contribution'
select *
from fins
where "Sub_Type" = 'Cash Contribution'
"The Good Government Council";"";"Interest/Investment Income";"3.23";"0";"10367"
select * from comms
where "Committee_Type" = 'CC'
select * from "PAC"
select * from committee
where "Committee_Id" = 10367
select * from fins limit 100;
create table fundingTargets
as select "Committee_Id", "Committee_Name"
select distinct "X_Book_Type_" from fins
select * from fins
where "X_Contributor_Payee_committee_ID" != ''
select * from fins
where "X_Purpose_Codes_" != ''
order by "X_Sub_Type_"
select distinct "X_Sub_Type_", count("X_Sub_Type_") from fins
where "X_Purpose_Codes_" != ''
group by "X_Sub_Type_"
order by count("X_Sub_Type_")
select distinct "X_Sub_Type_", count("X_Sub_Type_") from fins
group by "X_Sub_Type_"
order by count("X_Sub_Type_")
select * from fins
where "X_Purpose_Codes_" != ''
and "X_Sub_Type_" =
order by "X_Sub_Type_"
select distinct "X_Purpose_Codes_" from fins