Anonymous

Project:SPARQL/examples: Difference between revisions

From geokb
No edit summary
Line 45: Line 45:


= People =
= People =
== People and their identifiers ==
<sparql tryit="1">
PREFIX wd: <https://geokb.wikibase.cloud/entity/>
PREFIX wdt: <https://geokb.wikibase.cloud/prop/direct/>
PREFIX p: <https://geokb.wikibase.cloud/prop/>
PREFIX pq: <https://geokb.wikibase.cloud/prop/qualifier/>
SELECT ?item ?itemLabel ?itemDescription ?itemAltLabel ?email ?orcid ?url ?alt_url
WHERE {
  ?item wdt:P1 wd:Q3 .
  OPTIONAL {
    ?item wdt:P145 ?url ;
          p:P145 ?url_statement .
    OPTIONAL {
      ?url_statement pq:P202 ?alt_url .
    }
  }
  OPTIONAL {
    ?item wdt:P109 ?email .
  }
  OPTIONAL {
    ?item wdt:P106 ?orcid .
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}
</sparql>


== Occupations ==
== Occupations ==