<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://prunus-208.man.poznan.pl/index.php?action=history&amp;feed=atom&amp;title=SPARQL_examples%2Fpl</id>
	<title>SPARQL examples/pl - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://prunus-208.man.poznan.pl/index.php?action=history&amp;feed=atom&amp;title=SPARQL_examples%2Fpl"/>
	<link rel="alternate" type="text/html" href="https://prunus-208.man.poznan.pl/index.php?title=SPARQL_examples/pl&amp;action=history"/>
	<updated>2026-05-24T15:00:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://prunus-208.man.poznan.pl/index.php?title=SPARQL_examples/pl&amp;diff=1714377&amp;oldid=prev</id>
		<title>Pjaskulski@ihpan.edu.pl: Created page with &quot;&lt;!--T:4--&gt; This page is parsed by the web interface of the [https://{{SERVERNAME}}/wdqs query service] to fill the query example dialog.    === Instytucje ===  &lt;syntaxhighlight lang=&quot;SPARQL&quot; class=&quot;mw-highlight-lang-sparql&quot;&gt;   SELECT ?institution ?institutionLabel    WHERE   {       ?institution wdt:P47 wd:Q467. # instance of Institution       SERVICE wikibase:label { bd:serviceParam wikibase:language &quot;[AUTO_LANGUAGE],en&quot;. }   } &lt;/syntaxhighlight&gt; [https://{{SERVERNAME}}...&quot;</title>
		<link rel="alternate" type="text/html" href="https://prunus-208.man.poznan.pl/index.php?title=SPARQL_examples/pl&amp;diff=1714377&amp;oldid=prev"/>
		<updated>2024-08-27T07:06:24Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;!--T:4--&amp;gt; This page is parsed by the web interface of the [https://{{SERVERNAME}}/wdqs query service] to fill the query example dialog.    === Instytucje ===  &amp;lt;syntaxhighlight lang=&amp;quot;SPARQL&amp;quot; class=&amp;quot;mw-highlight-lang-sparql&amp;quot;&amp;gt;   SELECT ?institution ?institutionLabel    WHERE   {       ?institution wdt:P47 wd:Q467. # instance of Institution       SERVICE wikibase:label { bd:serviceParam wikibase:language &amp;quot;[AUTO_LANGUAGE],en&amp;quot;. }   } &amp;lt;/syntaxhighlight&amp;gt; [https://{{SERVERNAME}}...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
This page is parsed by the web interface of the [https://{{SERVERNAME}}/wdqs query service] to fill the query example dialog. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Instytucje ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;SPARQL&amp;quot; class=&amp;quot;mw-highlight-lang-sparql&amp;quot;&amp;gt;&lt;br /&gt;
  SELECT ?institution ?institutionLabel &lt;br /&gt;
  WHERE&lt;br /&gt;
  {&lt;br /&gt;
      ?institution wdt:P47 wd:Q467. # instance of Institution&lt;br /&gt;
      SERVICE wikibase:label { bd:serviceParam wikibase:language &amp;quot;[AUTO_LANGUAGE],en&amp;quot;. }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[https://{{SERVERNAME}}/wdqs/#SELECT%20%3Fitem%20%3FitemLabel%20%0AWHERE%20%0A%7B%0A%20%20%3Fitem%20wdt%3AP31%20wd%3AQ146.%20%23%20Must%20be%20of%20a%20cat%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%20%23%20Helps%20get%20the%20label%20in%20your%20language%2C%20if%20not%2C%20then%20en%20language%0A%7D Try it!]&lt;br /&gt;
&lt;br /&gt;
=== Ludzie ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;SPARQL&amp;quot; class=&amp;quot;mw-highlight-lang-sparql&amp;quot;&amp;gt;&lt;br /&gt;
#Lists all humans with values of selected fields&lt;br /&gt;
SELECT ?human ?humanLabel ?fatherLabel ?motherLabel ?date_of_birth WHERE {&lt;br /&gt;
  ?human wdt:P47 wd:Q32.&lt;br /&gt;
  OPTIONAL { ?human wdt:P66 ?father. }&lt;br /&gt;
  OPTIONAL { ?human wdt:P68 ?mother. }&lt;br /&gt;
  OPTIONAL { ?human wdt:P7 ?date_of_birth. }&lt;br /&gt;
  SERVICE wikibase:label { bd:serviceParam wikibase:language &amp;quot;[AUTO_LANGUAGE],en&amp;quot;. }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[https://{{SERVERNAME}}/wdqs/#%23Humans%20%0A%23Lists%20all%20humans%20with%20values%20of%20selected%20fields%0ASELECT%20%3Fhuman%20%3FhumanLabel%20%3FfatherLabel%20%3FmotherLabel%20%3Fdate_of_birth%20WHERE%20%7B%0A%20%20%3Fhuman%20wdt%3AP47%20wd%3AQ32.%0A%20%20OPTIONAL%20%7B%20%3Fhuman%20wdt%3AP66%20%3Ffather.%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fhuman%20wdt%3AP68%20%3Fmother.%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fhuman%20wdt%3AP7%20%3Fdate_of_birth.%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D Try it!]&lt;br /&gt;
&lt;br /&gt;
=== Humans without parents ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;SPARQL&amp;quot; class=&amp;quot;mw-highlight-lang-sparql&amp;quot;&amp;gt;&lt;br /&gt;
#Lists all humans without parents&lt;br /&gt;
SELECT ?human ?humanLabel WHERE {&lt;br /&gt;
  ?human wdt:P47 wd:Q32. #find humans&lt;br /&gt;
  MINUS {&lt;br /&gt;
    ?human wdt:P68 [] . # without father&lt;br /&gt;
    ?human wdt:P66 [] . # without mother&lt;br /&gt;
    ?human wdt:P65 [] . # without any unspecified parent&lt;br /&gt;
  }&lt;br /&gt;
  SERVICE wikibase:label { bd:serviceParam wikibase:language &amp;quot;[AUTO_LANGUAGE],en&amp;quot;. }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[https://{{SERVERNAME}}/wdqs/#%23Humans%20%0A%23Lists%20all%20humans%20without%20parents%0ASELECT%20%3Fhuman%20%3FhumanLabel%20WHERE%20%7B%0A%20%20%3Fhuman%20wdt%3AP47%20wd%3AQ32.%20%23find%20humans%0A%20%20MINUS%20%7B%0A%20%20%20%20%3Fhuman%20wdt%3AP68%20%5B%5D%20.%20%23%20without%20father%0A%20%20%20%20%3Fhuman%20wdt%3AP66%20%5B%5D%20.%20%23%20without%20mother%0A%20%20%20%20%3Fhuman%20wdt%3AP65%20%5B%5D%20.%20%23%20without%20any%20unspecified%20parent%0A%20%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D Try it!]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Elements from Bogumiłowice ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;SPARQL&amp;quot; class=&amp;quot;mw-highlight-lang-sparql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SELECT ?item ?itemLabel WHERE {&lt;br /&gt;
  ?item wdt:P30 wd:Q24. # element posiada właściwość miejsca i ta właściwość ma wartość Bogumiłowice&lt;br /&gt;
  SERVICE wikibase:label { bd:serviceParam wikibase:language &amp;quot;[AUTO_LANGUAGE],en&amp;quot;. }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[https://prunus-208.man.poznan.pl/wdqs/#%23Elementy%20%28nie%20tylko%20osoby%29%20z%20Bogumi%C5%82owic%0ASELECT%20%3Fitem%20%3FitemLabel%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP30%20wd%3AQ24.%20%23%20element%20posiada%20w%C5%82a%C5%9Bciwo%C5%9B%C4%87%20miejsca%20i%20ta%20w%C5%82a%C5%9Bciwo%C5%9B%C4%87%20ma%20warto%C5%9B%C4%87%20Bogumi%C5%82owice%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D Try it!]&lt;br /&gt;
&lt;br /&gt;
=== Osoby urodzone między rokiem 1501 a 1525 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;SPARQL&amp;quot; class=&amp;quot;mw-highlight-lang-sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT DISTINCT ?item ?itemLabel WHERE {&lt;br /&gt;
  ?item wdt:P47 wd:Q32.&lt;br /&gt;
  ?item wdt:P7 ?birthdate.&lt;br /&gt;
  FILTER((?birthdate &amp;gt;= &amp;quot;1501-01-01T00:00:00Z&amp;quot;^^xsd:dateTime) &amp;amp;&amp;amp; (?birthdate &amp;lt;= &amp;quot;1525-12-31T00:00:00Z&amp;quot;^^xsd:dateTime))&lt;br /&gt;
  SERVICE wikibase:label { bd:serviceParam wikibase:language &amp;quot;[AUTO_LANGUAGE],en&amp;quot;. }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[https://prunus-208.man.poznan.pl/wdqs/index.html#%23title%3A%20Osoby%20urodzone%20mi%C4%99dzy%20rokiem%201501%20a%201525%0ASELECT%20DISTINCT%20%3Fitem%20%3FitemLabel%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP47%20wd%3AQ32.%0A%20%20%3Fitem%20wdt%3AP7%20%3Fbirthdate.%0A%20%20FILTER%28%28%3Fbirthdate%20%3E%3D%20%221501-01-01T00%3A00%3A00Z%22%5E%5Exsd%3AdateTime%29%20%26%26%20%28%3Fbirthdate%20%3C%3D%20%221525-12-31T00%3A00%3A00Z%22%5E%5Exsd%3AdateTime%29%29%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D Try it!]&lt;br /&gt;
&lt;br /&gt;
=== Osoby o nazwisku Tarnowska/Tarnowski ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;SPARQL&amp;quot; class=&amp;quot;mw-highlight-lang-sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT DISTINCT ?item ?itemLabel ?title ?tom&lt;br /&gt;
WHERE &lt;br /&gt;
{&lt;br /&gt;
  ?item wdt:P47 wd:Q32 .      # człowiek&lt;br /&gt;
  ?item wdt:P17 ?biogram .    # posiadający właściwość opisano w źródle&lt;br /&gt;
  ?biogram wdt:P47 wd:Q708 .  # która jest elementem bądącym rozdziałem&lt;br /&gt;
  ?biogram wdt:P106 ?title .  # tytuł biogramu&lt;br /&gt;
  ?biogram wdt:P167 ?book .   # publikacja, tom PSB&lt;br /&gt;
  ?book wdt:P107 ?tom .       # tytuł tomu PSB&lt;br /&gt;
  {?item wdt:P183 wd:Q23187 .} # element z właściwością family name = elementowi Tarnowski&lt;br /&gt;
  UNION&lt;br /&gt;
  {?item wdt:P183 wd:Q4511 . } # element z właściwością family name = elementowi Tarnowska&lt;br /&gt;
  SERVICE wikibase:label { bd:serviceParam wikibase:language &amp;quot;[AUTO_LANGUAGE],en&amp;quot;. }&lt;br /&gt;
}&lt;br /&gt;
ORDER BY ?itemLabel&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[https://prunus-208.man.poznan.pl/wdqs/index.html#%23title%3A%20Osoby%20o%20nazwisku%20Tarnowski%2FTarnowska%0ASELECT%20DISTINCT%20%3Fitem%20%3FitemLabel%20%3Ftitle%20%3Ftom%0AWHERE%20%0A%7B%0A%20%20%3Fitem%20wdt%3AP47%20wd%3AQ32%20.%20%20%20%20%20%20%23%20cz%C5%82owiek%0A%20%20%3Fitem%20wdt%3AP17%20%3Fbiogram%20.%20%20%20%20%23%20posiadaj%C4%85cy%20w%C5%82a%C5%9Bciwo%C5%9B%C4%87%20opisano%20w%20%C5%BAr%C3%B3dle%0A%20%20%3Fbiogram%20wdt%3AP47%20wd%3AQ708%20.%20%20%23%20kt%C3%B3ra%20jest%20elementem%20b%C4%85d%C4%85cym%20rozdzia%C5%82em%0A%20%20%3Fbiogram%20wdt%3AP106%20%3Ftitle%20.%20%20%23%20tytu%C5%82%20biogramu%0A%20%20%3Fbiogram%20wdt%3AP167%20%3Fbook%20.%20%20%20%23%20publikacja%2C%20tom%20PSB%0A%20%20%3Fbook%20wdt%3AP107%20%3Ftom%20.%20%20%20%20%20%20%20%23%20tytu%C5%82%20tomu%20PSB%0A%20%20%7B%3Fitem%20wdt%3AP183%20wd%3AQ23187%20.%7D%20%23%20element%20z%20w%C5%82a%C5%9Bciwo%C5%9Bci%C4%85%20family%20name%20%3D%20elementowi%20Tarnowski%0A%20%20UNION%0A%20%20%7B%3Fitem%20wdt%3AP183%20wd%3AQ4511%20.%20%7D%20%23%20element%20z%20w%C5%82a%C5%9Bciwo%C5%9Bci%C4%85%20family%20name%20%3D%20elementowi%20Tarnowska%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D%0AORDER%20BY%20%3FitemLabel Try it!]&lt;br /&gt;
&lt;br /&gt;
=== Osoby aktywne w XVI wieku lecz bez precyzyjnie określonej daty urodzenia/śmierci ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;SPARQL&amp;quot; class=&amp;quot;mw-highlight-lang-sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT DISTINCT ?item ?itemLabel ?fluorit WHERE {&lt;br /&gt;
  ?item wdt:P47 wd:Q32.&lt;br /&gt;
  ?item wdt:P54 ?fluorit.&lt;br /&gt;
  FILTER ((?fluorit &amp;gt;= &amp;quot;+1501-01-01T00:00:00Z&amp;quot;^^xsd:dateTime) &amp;amp;&amp;amp; (?fluorit &amp;lt;= &amp;quot;+1600-01-01T00:00:00Z&amp;quot;^^xsd:dateTime))&lt;br /&gt;
  SERVICE wikibase:label { bd:serviceParam wikibase:language &amp;quot;[AUTO_LANGUAGE],en&amp;quot;. }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[https://prunus-208.man.poznan.pl/wdqs/#%23Osoby%20aktywne%20w%20XVI%20wieku%20%28bez%20precyzyjnej%20daty%20urodzenia%20i%20%C5%9Bmierci%29%0ASELECT%20DISTINCT%20%3Fitem%20%3FitemLabel%20%3Ffluorit%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP47%20wd%3AQ32.%0A%20%20%3Fitem%20wdt%3AP54%20%3Ffluorit.%0A%20%20FILTER%20%28%28%3Ffluorit%20%3E%3D%20%22%2B1501-01-01T00%3A00%3A00Z%22%5E%5Exsd%3AdateTime%29%20%26%26%20%28%3Ffluorit%20%3C%3D%20%22%2B1600-01-01T00%3A00%3A00Z%22%5E%5Exsd%3AdateTime%29%29%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D Try it!]&lt;br /&gt;
&lt;br /&gt;
=== Osoby żyjące w XVI wieku - urodzone, zmarłe lub aktywne ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;SPARQL&amp;quot; class=&amp;quot;mw-highlight-lang-sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT * WHERE&lt;br /&gt;
{ &lt;br /&gt;
 &lt;br /&gt;
  { &lt;br /&gt;
    SELECT DISTINCT ?item ?itemLabel WHERE {&lt;br /&gt;
    ?item wdt:P47 wd:Q32.&lt;br /&gt;
    ?item wdt:P7 ?birthdate.&lt;br /&gt;
    ?item wdt:P8 ?deathdate. &lt;br /&gt;
    FILTER(&lt;br /&gt;
           ((?birthdate &amp;gt;= &amp;quot;1501-01-01T00:00:00Z&amp;quot;^^xsd:dateTime) &amp;amp;&amp;amp; (?birthdate &amp;lt;= &amp;quot;1600-12-31T00:00:00Z&amp;quot;^^xsd:dateTime)) &lt;br /&gt;
           ||&lt;br /&gt;
           ((?deathdate &amp;gt;= &amp;quot;1501-01-01T00:00:00Z&amp;quot;^^xsd:dateTime) &amp;amp;&amp;amp; (?deathdate &amp;lt;= &amp;quot;1600-12-31T00:00:00Z&amp;quot;^^xsd:dateTime))&lt;br /&gt;
          ) &lt;br /&gt;
    SERVICE wikibase:label { bd:serviceParam wikibase:language &amp;quot;[AUTO_LANGUAGE],en&amp;quot;. }}&lt;br /&gt;
  }&lt;br /&gt;
UNION&lt;br /&gt;
  {&lt;br /&gt;
   SELECT DISTINCT ?item ?itemLabel WHERE {&lt;br /&gt;
    ?item wdt:P47 wd:Q32.&lt;br /&gt;
    ?item wdt:P54 ?fluorit.&lt;br /&gt;
    FILTER ((?fluorit &amp;gt;= &amp;quot;+1501-01-01T00:00:00Z&amp;quot;^^xsd:dateTime) &amp;amp;&amp;amp; (?fluorit &amp;lt;= &amp;quot;+1600-01-01T00:00:00Z&amp;quot;^^xsd:dateTime))&lt;br /&gt;
    SERVICE wikibase:label { bd:serviceParam wikibase:language &amp;quot;[AUTO_LANGUAGE],en&amp;quot;. }}&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
}&lt;br /&gt;
ORDER BY ?itemLabel&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[https://prunus-208.man.poznan.pl/wdqs/#%23Osoby%20%C5%BCyj%C4%85ce%20w%20XVI%20wieku%20%28zmar%C5%82e%20w%20XVI%20w.%20lub%20urodzone%20w%20XVI%20w.%29%0ASELECT%20%2a%20WHERE%0A%7B%20%0A%20%0A%20%20%7B%20%0A%20%20%20%20SELECT%20DISTINCT%20%3Fitem%20%3FitemLabel%20WHERE%20%7B%0A%20%20%20%20%3Fitem%20wdt%3AP47%20wd%3AQ32.%0A%20%20%20%20%3Fitem%20wdt%3AP7%20%3Fbirthdate.%0A%20%20%20%20%3Fitem%20wdt%3AP8%20%3Fdeathdate.%20%0A%20%20%20%20FILTER%28%0A%20%20%20%20%20%20%20%20%20%20%20%28%28%3Fbirthdate%20%3E%3D%20%221501-01-01T00%3A00%3A00Z%22%5E%5Exsd%3AdateTime%29%20%26%26%20%28%3Fbirthdate%20%3C%3D%20%221600-12-31T00%3A00%3A00Z%22%5E%5Exsd%3AdateTime%29%29%20%0A%20%20%20%20%20%20%20%20%20%20%20%7C%7C%0A%20%20%20%20%20%20%20%20%20%20%20%28%28%3Fdeathdate%20%3E%3D%20%221501-01-01T00%3A00%3A00Z%22%5E%5Exsd%3AdateTime%29%20%26%26%20%28%3Fdeathdate%20%3C%3D%20%221600-12-31T00%3A00%3A00Z%22%5E%5Exsd%3AdateTime%29%29%0A%20%20%20%20%20%20%20%20%20%20%29%20%0A%20%20%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%7D%0A%20%20%7D%0AUNION%0A%20%20%7B%0A%20%20%20SELECT%20DISTINCT%20%3Fitem%20%3FitemLabel%20WHERE%20%7B%0A%20%20%20%20%3Fitem%20wdt%3AP47%20wd%3AQ32.%0A%20%20%20%20%3Fitem%20wdt%3AP54%20%3Ffluorit.%0A%20%20%20%20FILTER%20%28%28%3Ffluorit%20%3E%3D%20%22%2B1501-01-01T00%3A00%3A00Z%22%5E%5Exsd%3AdateTime%29%20%26%26%20%28%3Ffluorit%20%3C%3D%20%22%2B1600-01-01T00%3A00%3A00Z%22%5E%5Exsd%3AdateTime%29%29%0A%20%20%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%7D%0A%20%20%7D%0A%20%20%20%0A%7D%0AORDER%20BY%20%3FitemLabel Try it!]&lt;br /&gt;
&lt;br /&gt;
=== Wiek w chwili śmierci dla osób z datą urodzenia/śmierci znaną co do roku ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;SPARQL&amp;quot; class=&amp;quot;mw-highlight-lang-sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?item ?itemLabel ?age &lt;br /&gt;
WHERE {&lt;br /&gt;
        ?item wdt:P47 wd:Q32 .&lt;br /&gt;
        ?item p:P7/psv:P7 ?birth_date_node . &lt;br /&gt;
        ?item p:P8/psv:P8 ?death_date_node .&lt;br /&gt;
        ?birth_date_node wikibase:timeValue ?birth_date.&lt;br /&gt;
        ?death_date_node wikibase:timeValue ?death_date.&lt;br /&gt;
        ?birth_date_node wikibase:timePrecision ?birth_precision.&lt;br /&gt;
        ?death_date_node wikibase:timePrecision ?death_precision.&lt;br /&gt;
        BIND( YEAR(?death_date) - YEAR(?birth_date) - &lt;br /&gt;
              IF(MONTH(?death_date)&amp;lt;MONTH(?birth_date) || &lt;br /&gt;
                 (MONTH(?death_date)=MONTH(?birth_date) &amp;amp;&amp;amp; DAY(?death_date)&amp;lt;DAY(?birth_date)),1,0) AS ?age )&lt;br /&gt;
        FILTER(?age &amp;gt; 0 &amp;amp;&amp;amp; ?age &amp;lt; 110 &amp;amp;&amp;amp; ?birth_precision &amp;gt;= 9 &amp;amp;&amp;amp; ?death_precision &amp;gt;= 9). &lt;br /&gt;
        SERVICE wikibase:label { bd:serviceParam wikibase:language &amp;quot;[AUTO_LANGUAGE],en&amp;quot;. }&lt;br /&gt;
}&lt;br /&gt;
ORDER BY DESC(?age)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[https://prunus-208.man.poznan.pl/wdqs/#SELECT%20%3Fitem%20%3FitemLabel%20%3Fage%20%0AWHERE%20%7B%0A%20%20%20%20%20%20%20%20%3Fitem%20wdt%3AP47%20wd%3AQ32%20.%0A%20%20%20%20%20%20%20%20%3Fitem%20p%3AP7%2Fpsv%3AP7%20%3Fbirth_date_node%20.%20%0A%20%20%20%20%20%20%20%20%3Fitem%20p%3AP8%2Fpsv%3AP8%20%3Fdeath_date_node%20.%0A%20%20%20%20%20%20%20%20%3Fbirth_date_node%20wikibase%3AtimeValue%20%3Fbirth_date.%0A%20%20%20%20%20%20%20%20%3Fdeath_date_node%20wikibase%3AtimeValue%20%3Fdeath_date.%0A%20%20%20%20%20%20%20%20%3Fbirth_date_node%20wikibase%3AtimePrecision%20%3Fbirth_precision.%0A%20%20%20%20%20%20%20%20%3Fdeath_date_node%20wikibase%3AtimePrecision%20%3Fdeath_precision.%0A%20%20%20%20%20%20%20%20BIND%28%20YEAR%28%3Fdeath_date%29%20-%20YEAR%28%3Fbirth_date%29%20-%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20IF%28MONTH%28%3Fdeath_date%29%3CMONTH%28%3Fbirth_date%29%20%7C%7C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28MONTH%28%3Fdeath_date%29%3DMONTH%28%3Fbirth_date%29%20%26%26%20DAY%28%3Fdeath_date%29%3CDAY%28%3Fbirth_date%29%29%2C1%2C0%29%20AS%20%3Fage%20%29%0A%20%20%20%20%20%20%20%20FILTER%28%3Fage%20%3E%200%20%26%26%20%3Fage%20%3C%20110%20%26%26%20%3Fbirth_precision%20%3E%3D%209%20%26%26%20%3Fdeath_precision%20%3E%3D%209%29.%20%0A%20%20%20%20%20%20%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D%0AORDER%20BY%20DESC%28%3Fage%29 Try it!]&lt;br /&gt;
&lt;br /&gt;
=== Miejscowości z AHP (XVI w.) w których znajdowała się karczma ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;SPARQL&amp;quot; class=&amp;quot;mw-highlight-lang-sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?item ?itemLabel ?ahp_id ?coordinate&lt;br /&gt;
  WHERE&lt;br /&gt;
  {&lt;br /&gt;
      ?item wdt:P403 ?ahp_id .&lt;br /&gt;
      ?item p:P420 ?statement .&lt;br /&gt;
      ?statement pq:P485 ?pointintime .&lt;br /&gt;
      ?statement ps:P420 ?coordinate .&lt;br /&gt;
      ?item p:P418 ?statement1.&lt;br /&gt;
      ?statement1 (ps:P418/(wdt:P56*)) wd:Q233991.&lt;br /&gt;
      FILTER(YEAR(?pointintime) = 1600)&lt;br /&gt;
      SERVICE wikibase:label { bd:serviceParam wikibase:language &amp;quot;[AUTO_LANGUAGE],en&amp;quot;. }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[https://prunus-208.man.poznan.pl/wdqs/index.html#SELECT%20%3Fitem%20%3FitemLabel%20%3Fahp_id%20%3Fcoordinate%0A%20%20WHERE%0A%20%20%7B%0A%20%20%20%20%20%20%3Fitem%20wdt%3AP403%20%3Fahp_id%20.%0A%20%20%20%20%20%20%3Fitem%20p%3AP420%20%3Fstatement%20.%0A%20%20%20%20%20%20%3Fstatement%20pq%3AP485%20%3Fpointintime%20.%0A%20%20%20%20%20%20%3Fstatement%20ps%3AP420%20%3Fcoordinate%20.%0A%20%20%20%20%20%20%3Fitem%20p%3AP418%20%3Fstatement1.%0A%20%20%20%20%20%20%3Fstatement1%20%28ps%3AP418%2F%28wdt%3AP56%2a%29%29%20wd%3AQ233991.%0A%20%20%20%20%20%20FILTER%28YEAR%28%3Fpointintime%29%20%3D%201600%29%0A%20%20%20%20%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%20%20%7D%0A Try it!]&lt;/div&gt;</summary>
		<author><name>Pjaskulski@ihpan.edu.pl</name></author>
	</entry>
</feed>