SPARQL examples

From Dariah-Lab
Jump to navigation Jump to search

This page is parsed by the web interface of the query service to fill the query example dialog.


Miejscowości z AHP (XVI w.) w których znajdowała się karczma

SELECT ?item ?itemLabel ?ahp_id ?coordinate
  WHERE
  {
      ?item wdt:P81 ?ahp_id .
      ?item p:P63 ?statement .
      ?statement pq:P40 ?pointintime .
      ?statement ps:P63 ?coordinate .
      ?item p:P77 ?statement1.
      ?statement1 (ps:P77/(wdt:P56*)) wd:Q68.
      FILTER(YEAR(?pointintime) = 1600)
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  }

Try it!

Osoby

# lista osób urodzonych w XVI wieku
SELECT DISTINCT ?human ?humanLabel (YEAR(?date_of_birth) AS ?year) WHERE {
  ?human wdt:P27 wd:Q5.
  ?human wdt:P11 ?date_of_birth.
  FILTER (YEAR(?date_of_birth) > 1500 && YEAR(?date_of_birth) < 1601)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?date_of_birth

Try it!