Skip to content

Instantly share code, notes, and snippets.

@janbenetka
Created January 31, 2021 17:23
Show Gist options
  • Save janbenetka/6bb4e4957631f6e1500077fdb3617580 to your computer and use it in GitHub Desktop.
Save janbenetka/6bb4e4957631f6e1500077fdb3617580 to your computer and use it in GitHub Desktop.
[SPARQL for employee count on DBPedia] #sparql #dbpedia
PREFIX dbpedia2: <http://dbpedia.org/property/>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
SELECT *
WHERE {
?s1 dbo:numberOfEmployees ?employee_count .
?s1 geo:long ?long .
?s1 geo:lat ?lat .
OPTIONAL {?s1 dbp:locationCountry ?country .}
OPTIONAL {?s1 dbp:locations ?location_count .}
FILTER(?employee_count > 10).
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment