Anonymous

Project:SPARQL/examples: Difference between revisions

From geokb
no edit summary
No edit summary
Line 42: Line 42:
}
}
GROUP BY ?item ?itemLabel ?item_alt_label ?instance_ofLabel
GROUP BY ?item ?itemLabel ?item_alt_label ?instance_ofLabel
</sparql>
= People =
== Occupations ==
<sparql tryit="1">
PREFIX wdt: <https://geokb.wikibase.cloud/prop/direct/>
PREFIX wd: <https://geokb.wikibase.cloud/entity/>
SELECT ?item ?itemLabel ?itemAltLabel
WHERE {
  ?item wdt:P2* wd:Q3 ;
        skos:altLabel ?itemAltLabel .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}
</sparql>
</sparql>