Skip to content

Instantly share code, notes, and snippets.

@timrobertson100
Created May 8, 2017 17:14
Show Gist options
  • Save timrobertson100/a9dac3e1e430a39339542c635806962a to your computer and use it in GitHub Desktop.
Save timrobertson100/a9dac3e1e430a39339542c635806962a to your computer and use it in GitHub Desktop.
publisherKey and datasetKey
select
p.key as publisherKey, p.title, d.key as datasetKey, d.title, replace(replace(e.url, 'http://registry.als.scot/GBIF/', ''), '.zip', '') as guid
from
dataset d JOIN
dataset_endpoint de ON d.key=de.dataset_key JOIN
endpoint e ON e.key=de.endpoint_key JOIN
organization p ON d.publishing_organization_key = p.key
where
e.url like 'http://registry.als.scot/GBIF/%'
order by p.title, d.title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment