SPARQL examples: Difference between revisions

From Dariah-Lab
Jump to navigation Jump to search
No edit summary
Line 8: Line 8:
   WHERE
   WHERE
   {
   {
       ?item wdt:P403 ?ahp_id .
       ?item wdt:P81 ?ahp_id .
       ?item p:P420 ?statement .
       ?item p:P63 ?statement .
       ?statement pq:P485 ?pointintime .
       ?statement pq:P40 ?pointintime .
       ?statement ps:P420 ?coordinate .
       ?statement ps:P63 ?coordinate .
       ?item p:P418 ?statement1.
       ?item p:P77 ?statement1.
       ?statement1 (ps:P418/(wdt:P56*)) wd:Q233991.
       ?statement1 (ps:P77/(wdt:P56*)) wd:Q233991.
       FILTER(YEAR(?pointintime) = 1600)
       FILTER(YEAR(?pointintime) = 1600)
       SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
       SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

Revision as of 10:42, 29 June 2024

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:Q233991.
      FILTER(YEAR(?pointintime) = 1600)
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  }

Try it!