Search…
Search the PDAP Datasets repository
Navigate to the Datasets repo in DoltHub.
Using any SQL editor, including the DoltHub UI, enter one of these queries to find a Dataset.

Find Agencies

1
--find dataset id by city
2
SELECT *
3
FROM `datasets`
4
JOIN `agencies` ON agencies.id = datasets.agency_id
5
WHERE agencies.city LIKE "%Antioch%"
6
​
7
--find dataset id by state
8
SELECT *
9
FROM `datasets`
10
JOIN `agencies` ON agencies.id = datasets.agency_id
11
WHERE agencies.state_iso = "MD"
12
​
13
--find dataset id by county name
14
SELECT *
15
FROM `datasets`
16
JOIN `agencies` ON agencies.id = datasets.agency_id
17
JOIN `counties` ON counties.fips = agencies.county_fips
18
WHERE counties.name LIKE "%Bibb%"
19
​
20
--find datasets by agency id
21
SELECT *
22
FROM `datasets`
23
WHERE `agency_id` = "b27ae147ba004dec875eeaa5259ebb57"
Copied!

Agency ID

1
--find agencies by city name
2
SELECT * FROM `agencies` WHERE `city` like "%Juneau%"
3
​
4
--find agencies by state
5
SELECT * FROM `agencies` WHERE `state_iso` = "NJ"
6
​
7
--find agencies by county
8
SELECT * FROM `agencies`
9
JOIN counties ON agencies.county_fips=counties.fips
10
WHERE `counties.name` LIKE "%Bibb%"
Copied!
Copy link
Edit on GitHub