SPARQL examples: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(14 intermediate revisions by the same user not shown) | |||
Line 206: | Line 206: | ||
[https://wikihum.lab.dariah.pl/wdqs/#%23title%3ASettlements%20that%20were%20monarchically%20owned%20in%20the%2016th%20century%0A%23defaultView%3AMap%0ASELECT%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%3AP81%20%3Fahp_id%20.%0A%20%20%20%20%20%20%3Fitem%20p%3AP63%20%3Fstatement%20.%0A%20%20%20%20%20%20%3Fitem%20p%3AP134%20%3Fstatement1.%0A%20%20%20%20%20%20%3Fstatement%20pq%3AP40%20%3Fpointintime%20.%0A%20%20%20%20%20%20%3Fstatement1%20pq%3AP40%20%3Fpointintime1%20.%0A%20%20%20%20%20%20%3Fstatement%20ps%3AP63%20%3Fcoordinate%20.%0A%20%20%20%20%20%20%3Fstatement1%20%28ps%3AP134%2F%28wdt%3AP56%2a%29%29%20wd%3AQ64.%20%20%23%20Q64%20-%20w%C5%82asno%C5%9B%C4%87%20monarsza%2C%20Q63%20-%20duchowna%2C%20Q65%20-%20mieszcza%C5%84ska%2C%20Q66%20-%20szlachecka%0A%20%20%20%20%20%20FILTER%28YEAR%28%3Fpointintime%29%20%3D%201600%29%0A%20%20%20%20%20%20FILTER%28YEAR%28%3Fpointintime1%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 Try It!] | [https://wikihum.lab.dariah.pl/wdqs/#%23title%3ASettlements%20that%20were%20monarchically%20owned%20in%20the%2016th%20century%0A%23defaultView%3AMap%0ASELECT%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%3AP81%20%3Fahp_id%20.%0A%20%20%20%20%20%20%3Fitem%20p%3AP63%20%3Fstatement%20.%0A%20%20%20%20%20%20%3Fitem%20p%3AP134%20%3Fstatement1.%0A%20%20%20%20%20%20%3Fstatement%20pq%3AP40%20%3Fpointintime%20.%0A%20%20%20%20%20%20%3Fstatement1%20pq%3AP40%20%3Fpointintime1%20.%0A%20%20%20%20%20%20%3Fstatement%20ps%3AP63%20%3Fcoordinate%20.%0A%20%20%20%20%20%20%3Fstatement1%20%28ps%3AP134%2F%28wdt%3AP56%2a%29%29%20wd%3AQ64.%20%20%23%20Q64%20-%20w%C5%82asno%C5%9B%C4%87%20monarsza%2C%20Q63%20-%20duchowna%2C%20Q65%20-%20mieszcza%C5%84ska%2C%20Q66%20-%20szlachecka%0A%20%20%20%20%20%20FILTER%28YEAR%28%3Fpointintime%29%20%3D%201600%29%0A%20%20%20%20%20%20FILTER%28YEAR%28%3Fpointintime1%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 Try It!] | ||
=== Human settlements by | === Human settlements by settlement ownership type in the 16th century === | ||
<syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | <syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | ||
#title:Human settlements by | #title:Human settlements by settlement ownership type in the 16th century | ||
#defaultView:Map | #defaultView:Map | ||
SELECT ?item ?itemLabel ?ahp_id ?coordinate ?layer | SELECT ?item ?itemLabel ?ahp_id ?coordinate ?layer | ||
Line 220: | Line 220: | ||
?statement ps:P63 ?coordinate . | ?statement ps:P63 ?coordinate . | ||
?statement1 (ps:P134/(wdt:P56*)) ?typ | ?statement1 (ps:P134/(wdt:P56*)) ?typ | ||
# Q64 - | # Q64 - monarchical property, Q63 - church property, Q65 - town property, Q66 - noble property | ||
BIND( | BIND( | ||
IF(?typ = wd:Q64, " | IF(?typ = wd:Q64, "monarchical", | ||
IF(?typ = wd:Q63, " | IF(?typ = wd:Q63, "church", | ||
IF(?typ = wd:Q65, " | IF(?typ = wd:Q65, "town", | ||
IF(?typ = wd:Q66, "noble", | IF(?typ = wd:Q66, "noble", | ||
"inna")))) | "inna")))) | ||
Line 234: | Line 234: | ||
GROUP BY ?item ?itemLabel ?ahp_id ?coordinate ?layer | GROUP BY ?item ?itemLabel ?ahp_id ?coordinate ?layer | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[https://wikihum.lab.dariah.pl/wdqs/#%23title%3AHuman%20settlements%20by% | [https://wikihum.lab.dariah.pl/wdqs/#%23title%3AHuman%20settlements%20by%20settlement%20ownership%20type%20in%20the%2016th%20century%0A%23defaultView%3AMap%0ASELECT%20%3Fitem%20%3FitemLabel%20%3Fahp_id%20%3Fcoordinate%20%3Flayer%0A%20%20WHERE%0A%20%20%7B%0A%20%20%20%20%20%20%3Fitem%20wdt%3AP81%20%3Fahp_id%20.%0A%20%20%20%20%20%20%3Fitem%20p%3AP63%20%3Fstatement%20.%0A%20%20%20%20%20%20%3Fitem%20p%3AP134%20%3Fstatement1.%0A%20%20%20%20%20%20%3Fstatement%20pq%3AP40%20%3Fpointintime%20.%0A%20%20%20%20%20%20%3Fstatement1%20pq%3AP40%20%3Fpointintime1%20.%0A%20%20%20%20%20%20%3Fstatement%20ps%3AP63%20%3Fcoordinate%20.%0A%20%20%20%20%20%20%3Fstatement1%20%28ps%3AP134%2F%28wdt%3AP56%2a%29%29%20%3Ftyp%0A%20%20%20%20%20%20%23%20Q64%20-%20royal%20property%2C%20Q63%20-%20ecclesiastical%20property%2C%20Q65%20-%20townsmen%20property%2C%20Q66%20-%20noble%20property%0A%20%20%20%20%20%20BIND%28%0A%20%20%20%20%20%20IF%28%3Ftyp%20%3D%20wd%3AQ64%2C%20%22royal%22%2C%0A%20%20%20%20%20%20IF%28%3Ftyp%20%3D%20wd%3AQ63%2C%20%22ecclesiastical%22%2C%0A%20%20%20%20%20%20IF%28%3Ftyp%20%3D%20wd%3AQ65%2C%20%22townsmen%22%2C%0A%20%20%20%20%20%20IF%28%3Ftyp%20%3D%20wd%3AQ66%2C%20%22noble%22%2C%0A%20%20%20%20%20%20%22inna%22%29%29%29%29%0A%20%20%20%20%20%20AS%20%3Flayer%29.%0A%20%20%20%20%20%20FILTER%28YEAR%28%3Fpointintime%29%20%3D%201600%29%0A%20%20%20%20%20%20FILTER%28YEAR%28%3Fpointintime1%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%0AGROUP%20BY%20%3Fitem%20%3FitemLabel%20%3Fahp_id%20%3Fcoordinate%20%3Flayer Try It!] | ||
=== Summary of the number of people born in each century === | === Summary of the number of people born in each century === | ||
Line 293: | Line 293: | ||
[https://wikihum.lab.dariah.pl/wdqs/#%23title%3APersons%20with%20the%20surname%20Sobieski%20born%20in%20the%2016th%20and%2017th%20centuries%0A%23defaultView%3ATimeline%0ASELECT%20DISTINCT%20%3Fperson%20%28MAX%28%3FdeathDate%29%20as%20%3Fddate%29%20%28MAX%28%3FbirthDate%29%20as%20%3Fbdate%29%20%28MAX%28%3FpersonLabel%29%20as%20%3Flabel%29%20WHERE%20%7B%0A%20%20%23%20Condition%20for%20persons%0A%20%20%3Fperson%20wdt%3AP27%20wd%3AQ5.%0A%20%20%3Fperson%20rdfs%3Alabel%20%3FpersonLabel.%0A%0A%20%20%23%20Collection%20of%20date%20of%20birth%20%0A%20%20%3Fperson%20p%3AP11%20%3FbirthStatement.%0A%20%20%3FbirthStatement%20ps%3AP11%20%3FbirthDate.%0A%20%20%0A%20%20%23%20Collection%20of%20date%20of%20death%0A%20%20%3Fperson%20p%3AP12%20%3FdeathStatement.%0A%20%20%3FdeathStatement%20ps%3AP12%20%3FdeathDate.%0A%20%20%0A%20%20%23%20date%20of%20birth%20filtering%20-%20range%201501-1700%20and%20surname%20%E2%80%98Sobieski%E2%80%99%20in%20the%20label%0A%20%20FILTER%28CONTAINS%28LCASE%28%3FpersonLabel%29%2C%20%22sobieski%22%29%20%26%26%20%3FbirthDate%20%3E%3D%20%221501-01-01T00%3A00%3A00Z%22%5E%5Exsd%3AdateTime%20%26%26%20%3FbirthDate%20%3C%3D%20%221700-12-31T23%3A59%3A59Z%22%5E%5Exsd%3AdateTime%29%0A%0A%7D%20GROUP%20BY%20%3Fperson%0AORDER%20BY%20%3FpersonLabel Try It!] | [https://wikihum.lab.dariah.pl/wdqs/#%23title%3APersons%20with%20the%20surname%20Sobieski%20born%20in%20the%2016th%20and%2017th%20centuries%0A%23defaultView%3ATimeline%0ASELECT%20DISTINCT%20%3Fperson%20%28MAX%28%3FdeathDate%29%20as%20%3Fddate%29%20%28MAX%28%3FbirthDate%29%20as%20%3Fbdate%29%20%28MAX%28%3FpersonLabel%29%20as%20%3Flabel%29%20WHERE%20%7B%0A%20%20%23%20Condition%20for%20persons%0A%20%20%3Fperson%20wdt%3AP27%20wd%3AQ5.%0A%20%20%3Fperson%20rdfs%3Alabel%20%3FpersonLabel.%0A%0A%20%20%23%20Collection%20of%20date%20of%20birth%20%0A%20%20%3Fperson%20p%3AP11%20%3FbirthStatement.%0A%20%20%3FbirthStatement%20ps%3AP11%20%3FbirthDate.%0A%20%20%0A%20%20%23%20Collection%20of%20date%20of%20death%0A%20%20%3Fperson%20p%3AP12%20%3FdeathStatement.%0A%20%20%3FdeathStatement%20ps%3AP12%20%3FdeathDate.%0A%20%20%0A%20%20%23%20date%20of%20birth%20filtering%20-%20range%201501-1700%20and%20surname%20%E2%80%98Sobieski%E2%80%99%20in%20the%20label%0A%20%20FILTER%28CONTAINS%28LCASE%28%3FpersonLabel%29%2C%20%22sobieski%22%29%20%26%26%20%3FbirthDate%20%3E%3D%20%221501-01-01T00%3A00%3A00Z%22%5E%5Exsd%3AdateTime%20%26%26%20%3FbirthDate%20%3C%3D%20%221700-12-31T23%3A59%3A59Z%22%5E%5Exsd%3AdateTime%29%0A%0A%7D%20GROUP%20BY%20%3Fperson%0AORDER%20BY%20%3FpersonLabel Try It!] | ||
=== | === Renaming of human settlements between the 16th century and the present (monarchical ownership only) === | ||
<syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | <syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | ||
#title: | #title:Renaming of human settlements between the 16th century and the present (monarchical ownership only) | ||
#defaultView:Map | #defaultView:Map | ||
SELECT ?place ?currentName ?historicNames ?coordinate ?layer | SELECT ?place ?currentName ?historicNames ?coordinate ?layer | ||
Line 301: | Line 301: | ||
BIND( | BIND( | ||
IF ( CONTAINS(LCASE(CONCAT(?historicNames,",")), LCASE(CONCAT(?currentName, ","))), " | IF ( CONTAINS(LCASE(CONCAT(?historicNames,",")), LCASE(CONCAT(?currentName, ","))), "continuation of", "change") AS ?layer ). | ||
{ | { | ||
SELECT ?place ?currentName ?coordinate (GROUP_CONCAT(?historicName; separator=",") AS ?historicNames) | SELECT ?place ?currentName ?coordinate (GROUP_CONCAT(?historicName; separator=",") AS ?historicNames) | ||
WHERE { | WHERE { | ||
?place wdt:P27 wd:Q175698; | ?place wdt:P27 wd:Q175698; | ||
rdfs:label ?currentName. | rdfs:label ?currentName. | ||
?place wdt:P134 wd:Q64. | ?place wdt:P134 wd:Q64. | ||
Line 317: | Line 317: | ||
pq:P40 ?pointInTime16thCentury. | pq:P40 ?pointInTime16thCentury. | ||
# | # Filter for a description containing the text ‘historic settlement’ | ||
?place schema:description ?settlementDescription. | ?place schema:description ?settlementDescription. | ||
FILTER(LANG(?settlementDescription) = "pl") # | FILTER(LANG(?settlementDescription) = "pl") # Description in Polish | ||
FILTER(!STRSTARTS(?settlementDescription, "osada historyczna")) | FILTER(!STRSTARTS(?settlementDescription, "osada historyczna")) | ||
Line 328: | Line 328: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[https://wikihum.lab.dariah.pl/wdqs/#%23title% | [https://wikihum.lab.dariah.pl/wdqs/#%23title%3ARenaming%20of%20human%20settlements%20between%20the%2016th%20century%20and%20the%20present%20%28monarchical%20ownership%20only%29%0A%23defaultView%3AMap%0ASELECT%20%3Fplace%20%3FcurrentName%20%3FhistoricNames%20%3Fcoordinate%20%3Flayer%0AWHERE%20%7B%0A%20%20%0A%20%20BIND%28%0A%20%20%20%20IF%20%28%20CONTAINS%28LCASE%28CONCAT%28%3FhistoricNames%2C%22%2C%22%29%29%2C%20LCASE%28CONCAT%28%3FcurrentName%2C%20%22%2C%22%29%29%29%2C%20%22continuation%20of%22%2C%20%22change%22%29%20AS%20%3Flayer%20%29.%0A%20%20%0A%20%20%7B%0A%20%20%20%20SELECT%20%3Fplace%20%3FcurrentName%20%3Fcoordinate%20%28GROUP_CONCAT%28%3FhistoricName%3B%20separator%3D%22%2C%22%29%20AS%20%3FhistoricNames%29%20%0A%20%20%20%20WHERE%20%7B%0A%20%20%20%20%20%20%3Fplace%20wdt%3AP27%20wd%3AQ175698%3B%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20rdfs%3Alabel%20%3FcurrentName.%0A%20%20%20%20%20%20%3Fplace%20wdt%3AP134%20wd%3AQ64.%0A%20%20%20%20%20%20%3Fplace%20p%3AP63%20%3Fstatement%20.%0A%20%20%20%20%20%20%3Fstatement%20pq%3AP40%20%3Fpointintime_coord%20.%0A%20%20%20%20%20%20%3Fstatement%20ps%3AP63%20%3Fcoordinate%20.%0A%20%20%0A%20%20%20%20%20%20%3Fplace%20p%3AP54%20%3FhistoricNameStatement%20.%0A%20%20%20%20%20%20%3FhistoricNameStatement%20ps%3AP54%20%3FhistoricName%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20pq%3AP40%20%3FpointInTime16thCentury.%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20%23%20Filter%20for%20a%20description%20containing%20the%20text%20%E2%80%98historic%20settlement%E2%80%99%0A%20%20%20%20%20%20%3Fplace%20schema%3Adescription%20%3FsettlementDescription.%0A%20%20%20%20%20%20FILTER%28LANG%28%3FsettlementDescription%29%20%3D%20%22pl%22%29%20%20%23%20Description%20in%20Polish%0A%20%20%20%20%20%20FILTER%28%21STRSTARTS%28%3FsettlementDescription%2C%20%22osada%20historyczna%22%29%29%20%0A%20%20%0A%20%20%20%20%20%20FILTER%28LANG%28%3FcurrentName%29%20%3D%20%22pl%22%20%26%26%20YEAR%28%3FpointInTime16thCentury%29%20%3D%201600%20%26%26%20YEAR%28%3Fpointintime_coord%29%20%3D%201600%29%0A%20%20%20%20%20%20%7D%0A%20%20%20%20GROUP%20BY%20%3Fplace%20%3FcurrentName%20%3Fcoordinate%0A%20%20%7D%0A%7D Try It!] | ||
=== | === Distances between the location of settlements in the 16th century and today (in km)=== | ||
<syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | <syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | ||
#title: | #title:Distances between the location of settlements in the 16th century and today (in km) | ||
SELECT DISTINCT ?place ?placeLabel ?distance | SELECT DISTINCT ?place ?placeLabel ?distance | ||
WHERE { | WHERE { | ||
Line 351: | Line 351: | ||
ORDER BY DESC (?distance) | ORDER BY DESC (?distance) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[https://wikihum.lab.dariah.pl/wdqs/#% | [https://wikihum.lab.dariah.pl/wdqs/#%23title%3ADistances%20between%20the%20location%20of%20settlements%20in%20the%2016th%20century%20and%20today%20%28in%20km%29%0ASELECT%20DISTINCT%20%3Fplace%20%3FplaceLabel%20%3Fdistance%20%0AWHERE%20%7B%0A%20%20%0ASELECT%20%3Fplace%20%3FplaceLabel%20%3Fcoord1%20%3Fcoord2%20%28geof%3Adistance%28%3Fcoord1%2C%20%3Fcoord2%29%20AS%20%3Fdistance%29%0AWHERE%20%7B%0A%20%20%3Fplace%20wdt%3AP27%20wd%3AQ175698%3B%0A%20%20%20%20%20%20%20%20%20p%3AP63%20%3Fstatement1%2C%20%3Fstatement2.%0A%0A%20%20%3Fstatement1%20ps%3AP63%20%3Fcoord1.%0A%20%20%3Fstatement2%20ps%3AP63%20%3Fcoord2.%0A%0A%20%20FILTER%28%3Fstatement1%20%21%3D%20%3Fstatement2%29%0A%20%20%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D%0A%7D%0AORDER%20BY%20DESC%20%28%3Fdistance%29 Try It!] | ||
=== | === Villages named: Wólka or Dąbrowa in the 16th century === | ||
<syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | <syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | ||
#title: | #title:Villages named: Wólka or Dąbrowa in the 16th century | ||
#defaultView:Map | #defaultView:Map | ||
SELECT ?item ?itemLabel ?ahp_id ?coordinate ?historicNames ?layer | SELECT ?item ?itemLabel ?ahp_id ?coordinate ?historicNames ?layer | ||
Line 387: | Line 387: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[https://wikihum.lab.dariah.pl/wdqs/#%23title% | [https://wikihum.lab.dariah.pl/wdqs/#%23title%3AVillages%20named%3A%20W%C3%B3lka%20or%20D%C4%85browa%20in%20the%2016th%20century%0A%23defaultView%3AMap%0ASELECT%20%3Fitem%20%3FitemLabel%20%3Fahp_id%20%3Fcoordinate%20%3FhistoricNames%20%3Flayer%0AWHERE%20%7B%0A%20%20%0ABIND%28%0A%20%20%20%20%20%20IF%28CONTAINS%28%3FhistoricNames%2C%20%22W%C3%B3lka%22%29%2C%20%22W%C3%B3lka%22%2C%0A%20%20%20%20%20%20IF%28CONTAINS%28%3FhistoricNames%2C%20%22D%C4%85browa%22%29%2C%20%22D%C4%85browa%22%2C%0A%20%20%20%20%20%20%22inna%22%29%29%0A%20%20%20%20%20%20AS%20%3Flayer%29.%0A%0A%20%20%7B%20%0A%20%20%20%20SELECT%20%3Fitem%20%3FitemLabel%20%3Fahp_id%20%3Fcoordinate%20%28GROUP_CONCAT%28%3FhistoricName%3B%20separator%3D%22%2C%22%29%20AS%20%3FhistoricNames%29%20%0A%20%20%20%20WHERE%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%3Fitem%20wdt%3AP81%20%3Fahp_id%20.%0A%20%20%20%20%20%20%3Fitem%20p%3AP63%20%3Fstatement%20.%0A%20%20%20%20%20%20%3Fstatement%20ps%3AP63%20%3Fcoordinate%20.%0A%20%20%20%20%20%20%3Fstatement%20pq%3AP40%20%3Fpointintime%20.%0A%20%20%20%20%0A%20%20%20%20%20%20%3Fitem%20p%3AP54%20%3FhistoricNameStatement%20.%0A%20%20%20%20%20%20%3FhistoricNameStatement%20ps%3AP54%20%3FhistoricName%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20pq%3AP40%20%3FpointInTime16thCentury.%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20FILTER%28%20YEAR%28%3Fpointintime%29%20%3D%201600%20%26%26%20YEAR%28%3FpointInTime16thCentury%29%20%3D%201600%20%26%26%20%28CONTAINS%28%3FhistoricName%2C%20%22W%C3%B3lka%22%29%20%7C%7C%20CONTAINS%28%3FhistoricName%2C%20%22D%C4%85browa%22%29%29%29%0A%20%20%20%20%7D%0A%20%20%20%20GROUP%20BY%20%3Fitem%20%3FitemLabel%20%3Fahp_id%20%3Fcoordinate%20%3FhistoricName%0A%20%20%7D%0A%20%20%0A%20%20FILTER%28%3Flayer%20%3D%20%22W%C3%B3lka%22%20%7C%7C%20%3Flayer%20%3D%20%22D%C4%85browa%22%29%0A%7D Try It!] | ||
=== Stara Wieś | === Occurrence of names: Stara Wieś and Nowa Wieś in the 16th century === | ||
<syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | <syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | ||
#title:Stara Wieś | #title:Occurrence of names: Stara Wieś and Nowa Wieś in the 16th century | ||
#defaultView:Map | #defaultView:Map | ||
SELECT ?item ?itemLabel ?ahp_id ?coordinate ?historicNames ?layer | SELECT ?item ?itemLabel ?ahp_id ?coordinate ?historicNames ?layer | ||
Line 423: | Line 423: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[https://wikihum.lab.dariah.pl/wdqs/#%23title% | [https://wikihum.lab.dariah.pl/wdqs/#%23title%3AOccurrence%20of%20names%3A%20Old%20Village%20and%20New%20Village%20in%20the%2016th%20century%0A%23defaultView%3AMap%0ASELECT%20%3Fitem%20%3FitemLabel%20%3Fahp_id%20%3Fcoordinate%20%3FhistoricNames%20%3Flayer%0AWHERE%20%7B%0A%20%20%0ABIND%28%0A%20%20%20%20%20%20IF%28CONTAINS%28%3FhistoricNames%2C%20%22Nowa%20Wie%C5%9B%22%29%2C%20%22Nowa%20Wie%C5%9B%22%2C%0A%20%20%20%20%20%20IF%28CONTAINS%28%3FhistoricNames%2C%20%22Stara%20Wie%C5%9B%22%29%2C%20%22Stara%20Wie%C5%9B%22%2C%0A%20%20%20%20%20%20%22inna%22%29%29%0A%20%20%20%20%20%20AS%20%3Flayer%29.%0A%0A%20%20%7B%20%0A%20%20%20%20SELECT%20%3Fitem%20%3FitemLabel%20%3Fahp_id%20%3Fcoordinate%20%28GROUP_CONCAT%28%3FhistoricName%3B%20separator%3D%22%2C%22%29%20AS%20%3FhistoricNames%29%20%0A%20%20%20%20WHERE%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%3Fitem%20wdt%3AP81%20%3Fahp_id%20.%0A%20%20%20%20%20%20%3Fitem%20p%3AP63%20%3Fstatement%20.%0A%20%20%20%20%20%20%3Fstatement%20ps%3AP63%20%3Fcoordinate%20.%0A%20%20%20%20%20%20%3Fstatement%20pq%3AP40%20%3Fpointintime%20.%0A%20%20%20%20%0A%20%20%20%20%20%20%3Fitem%20p%3AP54%20%3FhistoricNameStatement%20.%0A%20%20%20%20%20%20%3FhistoricNameStatement%20ps%3AP54%20%3FhistoricName%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20pq%3AP40%20%3FpointInTime16thCentury.%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20FILTER%28%20YEAR%28%3Fpointintime%29%20%3D%201600%20%26%26%20YEAR%28%3FpointInTime16thCentury%29%20%3D%201600%20%26%26%20%28CONTAINS%28%3FhistoricName%2C%20%22Nowa%20Wie%C5%9B%22%29%20%7C%7C%20CONTAINS%28%3FhistoricName%2C%20%22Stara%20Wie%C5%9B%22%29%29%29%0A%20%20%20%20%7D%0A%20%20%20%20GROUP%20BY%20%3Fitem%20%3FitemLabel%20%3Fahp_id%20%3Fcoordinate%20%3FhistoricName%0A%20%20%7D%0A%20%20%0A%20%20FILTER%28%3Flayer%20%3D%20%22Nowa%20Wie%C5%9B%22%20%7C%7C%20%3Flayer%20%3D%20%22Stara%20Wie%C5%9B%22%29%0A%7D Try It!] | ||
=== Human settlements (usually a village) which forms a so-called neighbourhood in 16 century === | |||
<syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | |||
#title:Human settlements (usually a village) which forms a so-called neighbourhood in 16 century | |||
#defaultView:Map | |||
SELECT DISTINCT ?item ?itemLabel ?ahp_id ?coordinate | |||
WHERE | |||
{ | |||
?item wdt:P81 ?ahp_id . | |||
?item p:P63 ?statement . | |||
?statement ps:P63 ?coordinate . | |||
?statement pq:P40 ?pointintime . | |||
?item wdt:P84 ?okolica | |||
FILTER( YEAR(?pointintime) = 1600) | |||
} | |||
</syntaxhighlight> | |||
[https://wikihum.lab.dariah.pl/wdqs/#%23title%3AHuman%20settlements%20%28usually%20a%20village%29%20which%20forms%20a%20so-called%20neighbourhood%20in%2016%20century%0A%23defaultView%3AMap%0A%20%20%20%20SELECT%20DISTINCT%20%3Fitem%20%3FitemLabel%20%3Fahp_id%20%3Fcoordinate%0A%20%20%20%20WHERE%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%3Fitem%20wdt%3AP81%20%3Fahp_id%20.%0A%20%20%20%20%20%20%3Fitem%20p%3AP63%20%3Fstatement%20.%0A%20%20%20%20%20%20%3Fstatement%20ps%3AP63%20%3Fcoordinate%20.%0A%20%20%20%20%20%20%3Fstatement%20pq%3AP40%20%3Fpointintime%20.%0A%20%20%20%20%0A%20%20%20%20%20%20%3Fitem%20wdt%3AP84%20%3Fokolica%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20FILTER%28%20YEAR%28%3Fpointintime%29%20%3D%201600%29%0A%20%20%20%20%7D Try it!] | |||
=== Catholic archdeaconates, deaneries and parishes in the 16th century === | |||
<syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | |||
#title:Catholic archdeaconates, deaneries and parishes in the 16th century | |||
#defaultView:Tree | |||
SELECT ?archidiakonat ?archidiakonatLabel ?dekanat ?dekanatLabel ?parafia ?parafiaLabel | |||
WHERE { | |||
# Finding of archdeaconries | |||
?archidiakonat wdt:P27 wd:Q722 . | |||
# Finding of deaneries that are part of archdeaconries | |||
?dekanat wdt:P27 wd:Q719 ; | |||
wdt:P37 ?archidiakonat . | |||
# Finding parishes that are part of deaneries | |||
?parafia wdt:P27 wd:Q714 ; | |||
wdt:P37 ?dekanat . | |||
# Pobranie etykiet | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],pl". } | |||
} | |||
ORDER BY ?archidiakonatLabel ?dekanatLabel ?parafiaLabel | |||
</syntaxhighlight> | |||
[https://wikihum.lab.dariah.pl/wdqs/#%23title%3ACatholic%20archdeaconates%2C%20deaneries%20and%20parishes%20in%20the%2016th%20century%0A%23defaultView%3ATree%0ASELECT%20%3Farchidiakonat%20%3FarchidiakonatLabel%20%3Fdekanat%20%3FdekanatLabel%20%3Fparafia%20%3FparafiaLabel%0AWHERE%20%7B%0A%20%20%23%20Finding%20of%20archdeaconries%0A%20%20%3Farchidiakonat%20wdt%3AP27%20wd%3AQ722%20.%0A%20%20%0A%20%20%23%20Finding%20of%20deaneries%20that%20are%20part%20of%20archdeaconries%0A%20%20%3Fdekanat%20wdt%3AP27%20wd%3AQ719%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20wdt%3AP37%20%3Farchidiakonat%20.%0A%20%20%0A%20%20%23%20Finding%20parishes%20that%20are%20part%20of%20deaneries%0A%20%20%3Fparafia%20wdt%3AP27%20wd%3AQ714%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20wdt%3AP37%20%3Fdekanat%20.%0A%20%20%0A%20%20%23%20Pobranie%20etykiet%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cpl%22.%20%7D%0A%7D%0AORDER%20BY%20%3FarchidiakonatLabel%20%3FdekanatLabel%20%3FparafiaLabel Try it!] | |||
=== Palatinates, district and settlements in the 16th century === | |||
<syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | |||
#title:Palatinates, district and settlements in the 16th century | |||
#defaultView:Tree | |||
SELECT ?wojewodztwo ?wojewodztwoLabel ?powiat ?powiatLabel ?miejscowosc ?miejscowoscLabel | |||
WHERE { | |||
?wojewodztwo wdt:P27 wd:Q905 . | |||
?powiat wdt:P27 wd:Q903 ; | |||
wdt:P37 ?wojewodztwo . | |||
?miejscowosc wdt:P27 wd:Q175698 ; | |||
wdt:P70 ?powiat . | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],pl". } | |||
} | |||
ORDER BY ?wojewodztwoLabel ?powiatLabel ?miejscowoscLabel | |||
</syntaxhighlight> | |||
[https://wikihum.lab.dariah.pl/wdqs/#%23title%3APalatinates%2C%20district%20and%20settlements%20in%20the%2016th%20century%0A%23defaultView%3ATree%0ASELECT%20%3Fwojewodztwo%20%3FwojewodztwoLabel%20%3Fpowiat%20%3FpowiatLabel%20%3Fmiejscowosc%20%3FmiejscowoscLabel%0AWHERE%20%7B%0A%20%20%3Fwojewodztwo%20wdt%3AP27%20wd%3AQ905%20.%0A%20%20%0A%20%20%3Fpowiat%20wdt%3AP27%20wd%3AQ903%20%3B%0A%20%20%20%20%20%20%20%20%20%20wdt%3AP37%20%3Fwojewodztwo%20.%0A%20%20%0A%20%20%3Fmiejscowosc%20wdt%3AP27%20wd%3AQ175698%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20wdt%3AP70%20%3Fpowiat%20.%0A%20%20%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cpl%22.%20%7D%0A%7D%0AORDER%20BY%20%3FwojewodztwoLabel%20%3FpowiatLabel%20%3FmiejscowoscLabel Try It!] | |||
=== Number of parishes and deaneries in archdeaconries in the 16th century === | |||
<syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | |||
#title:Number of parishes and deaneries in archdeaconries in the 16th century | |||
SELECT ?archidiakonat ?archidiakonatLabel (COUNT(DISTINCT ?dekanat) AS ?liczba_dekanatow) (COUNT(DISTINCT ?parafia) AS ?liczba_parafii) | |||
WHERE { | |||
?archidiakonat wdt:P27 wd:Q722 . | |||
?dekanat wdt:P27 wd:Q719 ; | |||
wdt:P37 ?archidiakonat . | |||
?parafia wdt:P27 wd:Q714 ; | |||
wdt:P37 ?dekanat . | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | |||
} | |||
GROUP BY ?archidiakonat ?archidiakonatLabel | |||
ORDER BY ?archidiakonatLabel | |||
</syntaxhighlight> | |||
[https://wikihum.lab.dariah.pl/wdqs/#%23title%3ANumber%20of%20parishes%20and%20deaneries%20in%20archdeaconries%20in%20the%2016th%20century%0ASELECT%20%3Farchidiakonat%20%3FarchidiakonatLabel%20%28COUNT%28DISTINCT%20%3Fdekanat%29%20AS%20%3Fliczba_dekanatow%29%20%28COUNT%28DISTINCT%20%3Fparafia%29%20AS%20%3Fliczba_parafii%29%0AWHERE%20%7B%0A%20%20%3Farchidiakonat%20wdt%3AP27%20wd%3AQ722%20.%0A%20%20%0A%20%20%3Fdekanat%20wdt%3AP27%20wd%3AQ719%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20wdt%3AP37%20%3Farchidiakonat%20.%0A%20%20%0A%20%20%3Fparafia%20wdt%3AP27%20wd%3AQ714%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20wdt%3AP37%20%3Fdekanat%20.%0A%20%20%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D%0AGROUP%20BY%20%3Farchidiakonat%20%3FarchidiakonatLabel%0AORDER%20BY%20%3FarchidiakonatLabel%0A Try it!] | |||
=== Number of settlements and districts in the palatinates in the 16th century === | |||
<syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | |||
#title:Number of settlements and districts in the palatinates in the 16th century | |||
SELECT ?palatinate ?palatinateLabel (COUNT(DISTINCT ?district) AS ?num_districts) (COUNT(DISTINCT ?settlement) AS ?num_settlements) | |||
WHERE { | |||
?palatinate wdt:P27 wd:Q905 . | |||
?district wdt:P27 wd:Q903 ; | |||
wdt:P37 ?palatinate . | |||
?settlement wdt:P27 wd:Q175698 ; | |||
wdt:P70 ?district . | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } | |||
} | |||
GROUP BY ?palatinate ?palatinateLabel | |||
ORDER BY ?palatinateLabel | |||
</syntaxhighlight> | |||
[https://wikihum.lab.dariah.pl/wdqs/#%23title%3ANumber%20of%20settlements%20and%20districts%20in%20the%20palatinates%20in%20the%2016th%20century%0ASELECT%20%3Fpalatinate%20%3FpalatinateLabel%20%28COUNT%28DISTINCT%20%3Fdistrict%29%20AS%20%3Fnum_districts%29%20%28COUNT%28DISTINCT%20%3Fsettlement%29%20AS%20%3Fnum_settlements%29%0AWHERE%20%7B%0A%20%20%3Fpalatinate%20wdt%3AP27%20wd%3AQ905%20.%0A%20%20%0A%20%20%3Fdistrict%20wdt%3AP27%20wd%3AQ903%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20wdt%3AP37%20%3Fpalatinate%20.%0A%20%0A%20%20%3Fsettlement%20wdt%3AP27%20wd%3AQ175698%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20wdt%3AP70%20%3Fdistrict%20.%0A%20%20%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%20%7D%0A%7D%0AGROUP%20BY%20%3Fpalatinate%20%3FpalatinateLabel%0AORDER%20BY%20%3FpalatinateLabel Try it!] | |||
=== Cities in the palatinates in the 16th century === | |||
<syntaxhighlight lang="SPARQL" class="mw-highlight-lang-sparql"> | |||
#title:Cities in the palatinates in the 16th century | |||
#defaultView:Map | |||
SELECT ?palatinate ?palatinateLabel ?district ?districtLabel ?city ?cityLabel ?coordinate ?layer | |||
WHERE { | |||
?palatinate wdt:P27 wd:Q905 . | |||
?district wdt:P27 wd:Q903 ; | |||
wdt:P37 ?palatinate . | |||
?city wdt:P27 wd:Q175698 ; | |||
wdt:P70 ?district . | |||
?city p:P62 ?statement1 . | |||
?statement1 pq:P40 ?pointintime1 . | |||
?statement1 (ps:P62/(wdt:P56*)) wd:Q622 . | |||
?city p:P63 ?statement . | |||
?statement ps:P63 ?coordinate . | |||
?statement pq:P40 ?pointintime . | |||
?palatinate rdfs:label ?layer . | |||
FILTER(YEAR(?pointintime) = 1600 && LANG(?layer) = "en") | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } | |||
} | |||
</syntaxhighlight> | |||
[https://wikihum.lab.dariah.pl/wdqs/#%23title%3ACities%20in%20the%20palatinates%20in%20the%2016th%20century%0A%23defaultView%3AMap%0ASELECT%20%3Fpalatinate%20%3FpalatinateLabel%20%3Fdistrict%20%3FdistrictLabel%20%3Fcity%20%3FcityLabel%20%3Fcoordinate%20%3Flayer%0AWHERE%20%7B%0A%20%20%3Fpalatinate%20wdt%3AP27%20wd%3AQ905%20.%0A%20%20%0A%20%20%3Fdistrict%20wdt%3AP27%20wd%3AQ903%20%3B%0A%20%20%20%20%20%20%20%20%20%20wdt%3AP37%20%3Fpalatinate%20.%0A%20%20%0A%20%20%3Fcity%20wdt%3AP27%20wd%3AQ175698%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20wdt%3AP70%20%3Fdistrict%20.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%3Fcity%20p%3AP62%20%3Fstatement1%20.%0A%20%20%3Fstatement1%20pq%3AP40%20%3Fpointintime1%20.%0A%20%20%3Fstatement1%20%28ps%3AP62%2F%28wdt%3AP56%2a%29%29%20wd%3AQ622%20.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%3Fcity%20p%3AP63%20%3Fstatement%20.%0A%20%20%3Fstatement%20ps%3AP63%20%3Fcoordinate%20.%0A%20%20%3Fstatement%20pq%3AP40%20%3Fpointintime%20.%0A%20%20%3Fpalatinate%20rdfs%3Alabel%20%3Flayer%20.%0A%20%20%0A%20%20FILTER%28YEAR%28%3Fpointintime%29%20%3D%201600%20%26%26%20LANG%28%3Flayer%29%20%3D%20%22en%22%29%0A%20%20%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%20%7D%0A%7D Try it!] |
Latest revision as of 18:49, 1 September 2024
This page is parsed by the web interface of the query service to fill the query example dialog.
Towns that served as county capital in the 16th century
#title:Towns that served as county capital in the 16th century
#defaultView:Map
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:P79 ?statement1.
?statement1 pq:P40 ?pointintime1 .
?statement1 (ps:P79/(wdt:P56*)) wd:Q99. # stolica powiatu
FILTER(YEAR(?pointintime) = 1600 && YEAR(?pointintime1) = 1600)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Human settlements that were places of the local assembly in the 16th century
#title:Human settlements that were places of the local assembly in the 16th century
#defaultView:Map
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:P79 ?statement1.
?statement1 pq:P40 ?pointintime1 .
?statement1 (ps:P79/(wdt:P56*)) wd:Q91. # places of the local assembly
FILTER(YEAR(?pointintime) = 1600 && YEAR(?pointintime1) = 1600)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Human settlements that were towns in the 16th century and are now villages
#title:Human settlements that were towns in the 16th century and are now villages
#defaultView:Map
SELECT ?settlement ?settlementLabel ?coordinate16thCentury WHERE {
# Warunek dla miejscowości
?settlement wdt:P27 wd:Q175698.
# It was a town in the 16th century
?settlement p:P62 ?cityStatement.
?cityStatement ps:P62 wd:Q622;
pq:P40 ?pointInTime16thCentury.
FILTER(YEAR(?pointInTime16thCentury) > 1500 && YEAR(?pointInTime16thCentury) <= 1600)
# it is a village in the year 2022
?settlement p:P62 ?villageStatement.
?villageStatement ps:P62 wd:Q653;
pq:P40 ?pointInTime2022.
FILTER(YEAR(?pointInTime2022) = 2022)
# geographical coordinates from the 16th century
?settlement p:P63 ?coordStatement.
?coordStatement ps:P63 ?coordinate16thCentury;
pq:P40 ?coordTime.
FILTER(YEAR(?coordTime) > 1500 && YEAR(?coordTime) <= 1600)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Human settlements that existed in the 16th century but do not exist today
#title:Human settlements that existed in the 16th century but do not exist today
#defaultView:Map
SELECT ?settlement ?settlementLabel ?settlementDescription ?coordinate16thCentury WHERE {
# Condition for elements that are human settlements
?settlement wdt:P27 wd:Q175698.
# Filter for a description containing the text ‘historic settlement’
?settlement schema:description ?settlementDescription.
FILTER(CONTAINS(LCASE(?settlementDescription), "osada historyczna"))
# geographical coordinates from the 16th century
?settlement p:P63 ?coordStatement.
?coordStatement ps:P63 ?coordinate16thCentury;
pq:P40 ?coordTime.
FILTER(YEAR(?coordTime) > 1500 && YEAR(?coordTime) <= 1600)
# Service for labels and descriptions in the indicated language
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],pl". }
}
People born in the 16th century
#title:People born in the 16th century
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
List of long-lived persons
#title:Persons with known date of birth and death who have lived beyond 90 years
SELECT DISTINCT ?item ?itemLabel ?age
WHERE {
?item wdt:P27 wd:Q5 .
?item p:P11/psv:P11 ?birth_date_node .
?item p:P12/psv:P12 ?death_date_node .
?birth_date_node wikibase:timeValue ?birth_date.
?death_date_node wikibase:timeValue ?death_date.
?birth_date_node wikibase:timePrecision ?birth_precision.
?death_date_node wikibase:timePrecision ?death_precision.
BIND( YEAR(?death_date) - YEAR(?birth_date) -
IF(MONTH(?death_date)<MONTH(?birth_date) ||
(MONTH(?death_date)=MONTH(?birth_date) && DAY(?death_date)<DAY(?birth_date)),1,0) AS ?age )
FILTER(?age > 90 && ?birth_precision >= 9 && ?death_precision >= 9).
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?age)
Persons living in the 16th century - born, deceased or active during this period
#title:Persons living in the 16th century - born, deceased or active during this period
SELECT * WHERE
{
{
SELECT DISTINCT ?item ?itemLabel WHERE {
?item wdt:P27 wd:Q5.
?item wdt:P11 ?birthdate.
?item wdt:P12 ?deathdate.
FILTER(
((?birthdate >= "1501-01-01T00:00:00Z"^^xsd:dateTime) && (?birthdate <= "1600-12-31T00:00:00Z"^^xsd:dateTime))
||
((?deathdate >= "1501-01-01T00:00:00Z"^^xsd:dateTime) && (?deathdate <= "1600-12-31T00:00:00Z"^^xsd:dateTime))
)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }}
}
UNION
{
SELECT DISTINCT ?item ?itemLabel WHERE {
?item wdt:P27 wd:Q5.
?item wdt:P87 ?fluorit.
FILTER ((?fluorit >= "+1501-01-01T00:00:00Z"^^xsd:dateTime) && (?fluorit <= "+1600-01-01T00:00:00Z"^^xsd:dateTime))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }}
}
}
ORDER BY ?itemLabel
Human settlements that were cities in the 16th century
#title:Human settlements that were cities in the 16th century
#defaultView:Map
SELECT ?item ?itemLabel ?ahp_id ?coordinate
WHERE
{
?item wdt:P81 ?ahp_id .
?item p:P63 ?statement .
?statement pq:P40 ?pointintime .
?item p:P62 ?statement1.
?statement1 pq:P40 ?pointintime1 .
?statement ps:P63 ?coordinate .
?statement1 (ps:P62/(wdt:P56*)) wd:Q622.
FILTER(YEAR(?pointintime) = 1600 && YEAR(?pointintime1) = 1600)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Human settlements that were monarchically owned in the 16th century
#title:Human settlements that were monarchically owned in the 16th century
#defaultView:Map
SELECT ?item ?itemLabel ?ahp_id ?coordinate
WHERE
{
?item wdt:P81 ?ahp_id .
?item p:P63 ?statement .
?item p:P134 ?statement1.
?statement pq:P40 ?pointintime .
?statement1 pq:P40 ?pointintime1 .
?statement ps:P63 ?coordinate .
?statement1 (ps:P134/(wdt:P56*)) wd:Q64. # Q64 - własność monarsza, Q63 - duchowna, Q65 - mieszczańska, Q66 - szlachecka
FILTER(YEAR(?pointintime) = 1600)
FILTER(YEAR(?pointintime1) = 1600)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Human settlements by settlement ownership type in the 16th century
#title:Human settlements by settlement ownership type in the 16th century
#defaultView:Map
SELECT ?item ?itemLabel ?ahp_id ?coordinate ?layer
WHERE
{
?item wdt:P81 ?ahp_id .
?item p:P63 ?statement .
?item p:P134 ?statement1.
?statement pq:P40 ?pointintime .
?statement1 pq:P40 ?pointintime1 .
?statement ps:P63 ?coordinate .
?statement1 (ps:P134/(wdt:P56*)) ?typ
# Q64 - monarchical property, Q63 - church property, Q65 - town property, Q66 - noble property
BIND(
IF(?typ = wd:Q64, "monarchical",
IF(?typ = wd:Q63, "church",
IF(?typ = wd:Q65, "town",
IF(?typ = wd:Q66, "noble",
"inna"))))
AS ?layer).
FILTER(YEAR(?pointintime) = 1600)
FILTER(YEAR(?pointintime1) = 1600)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?item ?itemLabel ?ahp_id ?coordinate ?layer
Summary of the number of people born in each century
#title:Summary of the number of people born in each century
#defaultView:BarChart
SELECT ?centuryRoman (COUNT(*) AS ?count)
WHERE {
?person wdt:P27 wd:Q5;
wdt:P11 ?birthDate .
# Calculation of centenary based on year of birth
BIND(CEIL((YEAR(?birthDate) - 1) / 100) AS ?century)
BIND(
IF(?century = 10, "X",
IF(?century = 11, "XI",
IF(?century = 12, "XII",
IF(?century = 13, "XIII",
IF(?century = 14, "XIV",
IF(?century = 15, "XV",
IF(?century = 16, "XVI",
IF(?century = 17, "XVII",
IF(?century = 18, "XVIII",
IF(?century = 19, "XIX",
IF(?century = 20, "XX",
""))))))))))) AS ?centuryRoman).
# filtering out incorrect data
FILTER(?century >= 10 && ?century < 21)
}
GROUP BY ?centuryRoman
ORDER BY ?count
Persons with the surname Sobieski born in the 16th and 17th centuries
#title:Persons with the surname Sobieski born in the 16th and 17th centuries
#defaultView:Timeline
SELECT DISTINCT ?person (MAX(?deathDate) as ?ddate) (MAX(?birthDate) as ?bdate) (MAX(?personLabel) as ?label) WHERE {
# Condition for persons
?person wdt:P27 wd:Q5.
?person rdfs:label ?personLabel.
# Collection of date of birth
?person p:P11 ?birthStatement.
?birthStatement ps:P11 ?birthDate.
# Collection of date of death
?person p:P12 ?deathStatement.
?deathStatement ps:P12 ?deathDate.
# date of birth filtering - range 1501-1700 and surname ‘Sobieski’ in the label
FILTER(CONTAINS(LCASE(?personLabel), "sobieski") && ?birthDate >= "1501-01-01T00:00:00Z"^^xsd:dateTime && ?birthDate <= "1700-12-31T23:59:59Z"^^xsd:dateTime)
} GROUP BY ?person
ORDER BY ?personLabel
Renaming of human settlements between the 16th century and the present (monarchical ownership only)
#title:Renaming of human settlements between the 16th century and the present (monarchical ownership only)
#defaultView:Map
SELECT ?place ?currentName ?historicNames ?coordinate ?layer
WHERE {
BIND(
IF ( CONTAINS(LCASE(CONCAT(?historicNames,",")), LCASE(CONCAT(?currentName, ","))), "continuation of", "change") AS ?layer ).
{
SELECT ?place ?currentName ?coordinate (GROUP_CONCAT(?historicName; separator=",") AS ?historicNames)
WHERE {
?place wdt:P27 wd:Q175698;
rdfs:label ?currentName.
?place wdt:P134 wd:Q64.
?place p:P63 ?statement .
?statement pq:P40 ?pointintime_coord .
?statement ps:P63 ?coordinate .
?place p:P54 ?historicNameStatement .
?historicNameStatement ps:P54 ?historicName;
pq:P40 ?pointInTime16thCentury.
# Filter for a description containing the text ‘historic settlement’
?place schema:description ?settlementDescription.
FILTER(LANG(?settlementDescription) = "pl") # Description in Polish
FILTER(!STRSTARTS(?settlementDescription, "osada historyczna"))
FILTER(LANG(?currentName) = "pl" && YEAR(?pointInTime16thCentury) = 1600 && YEAR(?pointintime_coord) = 1600)
}
GROUP BY ?place ?currentName ?coordinate
}
}
Distances between the location of settlements in the 16th century and today (in km)
#title:Distances between the location of settlements in the 16th century and today (in km)
SELECT DISTINCT ?place ?placeLabel ?distance
WHERE {
SELECT ?place ?placeLabel ?coord1 ?coord2 (geof:distance(?coord1, ?coord2) AS ?distance)
WHERE {
?place wdt:P27 wd:Q175698;
p:P63 ?statement1, ?statement2.
?statement1 ps:P63 ?coord1.
?statement2 ps:P63 ?coord2.
FILTER(?statement1 != ?statement2)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
}
ORDER BY DESC (?distance)
Villages named: Wólka or Dąbrowa in the 16th century
#title:Villages named: Wólka or Dąbrowa in the 16th century
#defaultView:Map
SELECT ?item ?itemLabel ?ahp_id ?coordinate ?historicNames ?layer
WHERE {
BIND(
IF(CONTAINS(?historicNames, "Wólka"), "Wólka",
IF(CONTAINS(?historicNames, "Dąbrowa"), "Dąbrowa",
"inna"))
AS ?layer).
{
SELECT ?item ?itemLabel ?ahp_id ?coordinate (GROUP_CONCAT(?historicName; separator=",") AS ?historicNames)
WHERE
{
?item wdt:P81 ?ahp_id .
?item p:P63 ?statement .
?statement ps:P63 ?coordinate .
?statement pq:P40 ?pointintime .
?item p:P54 ?historicNameStatement .
?historicNameStatement ps:P54 ?historicName;
pq:P40 ?pointInTime16thCentury.
FILTER( YEAR(?pointintime) = 1600 && YEAR(?pointInTime16thCentury) = 1600 && (CONTAINS(?historicName, "Wólka") || CONTAINS(?historicName, "Dąbrowa")))
}
GROUP BY ?item ?itemLabel ?ahp_id ?coordinate ?historicName
}
FILTER(?layer = "Wólka" || ?layer = "Dąbrowa")
}
Occurrence of names: Stara Wieś and Nowa Wieś in the 16th century
#title:Occurrence of names: Stara Wieś and Nowa Wieś in the 16th century
#defaultView:Map
SELECT ?item ?itemLabel ?ahp_id ?coordinate ?historicNames ?layer
WHERE {
BIND(
IF(CONTAINS(?historicNames, "Nowa Wieś"), "Nowa Wieś",
IF(CONTAINS(?historicNames, "Stara Wieś"), "Stara Wieś",
"inna"))
AS ?layer).
{
SELECT ?item ?itemLabel ?ahp_id ?coordinate (GROUP_CONCAT(?historicName; separator=",") AS ?historicNames)
WHERE
{
?item wdt:P81 ?ahp_id .
?item p:P63 ?statement .
?statement ps:P63 ?coordinate .
?statement pq:P40 ?pointintime .
?item p:P54 ?historicNameStatement .
?historicNameStatement ps:P54 ?historicName;
pq:P40 ?pointInTime16thCentury.
FILTER( YEAR(?pointintime) = 1600 && YEAR(?pointInTime16thCentury) = 1600 && (CONTAINS(?historicName, "Nowa Wieś") || CONTAINS(?historicName, "Stara Wieś")))
}
GROUP BY ?item ?itemLabel ?ahp_id ?coordinate ?historicName
}
FILTER(?layer = "Nowa Wieś" || ?layer = "Stara Wieś")
}
Human settlements (usually a village) which forms a so-called neighbourhood in 16 century
#title:Human settlements (usually a village) which forms a so-called neighbourhood in 16 century
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?ahp_id ?coordinate
WHERE
{
?item wdt:P81 ?ahp_id .
?item p:P63 ?statement .
?statement ps:P63 ?coordinate .
?statement pq:P40 ?pointintime .
?item wdt:P84 ?okolica
FILTER( YEAR(?pointintime) = 1600)
}
Catholic archdeaconates, deaneries and parishes in the 16th century
#title:Catholic archdeaconates, deaneries and parishes in the 16th century
#defaultView:Tree
SELECT ?archidiakonat ?archidiakonatLabel ?dekanat ?dekanatLabel ?parafia ?parafiaLabel
WHERE {
# Finding of archdeaconries
?archidiakonat wdt:P27 wd:Q722 .
# Finding of deaneries that are part of archdeaconries
?dekanat wdt:P27 wd:Q719 ;
wdt:P37 ?archidiakonat .
# Finding parishes that are part of deaneries
?parafia wdt:P27 wd:Q714 ;
wdt:P37 ?dekanat .
# Pobranie etykiet
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],pl". }
}
ORDER BY ?archidiakonatLabel ?dekanatLabel ?parafiaLabel
Palatinates, district and settlements in the 16th century
#title:Palatinates, district and settlements in the 16th century
#defaultView:Tree
SELECT ?wojewodztwo ?wojewodztwoLabel ?powiat ?powiatLabel ?miejscowosc ?miejscowoscLabel
WHERE {
?wojewodztwo wdt:P27 wd:Q905 .
?powiat wdt:P27 wd:Q903 ;
wdt:P37 ?wojewodztwo .
?miejscowosc wdt:P27 wd:Q175698 ;
wdt:P70 ?powiat .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],pl". }
}
ORDER BY ?wojewodztwoLabel ?powiatLabel ?miejscowoscLabel
Number of parishes and deaneries in archdeaconries in the 16th century
#title:Number of parishes and deaneries in archdeaconries in the 16th century
SELECT ?archidiakonat ?archidiakonatLabel (COUNT(DISTINCT ?dekanat) AS ?liczba_dekanatow) (COUNT(DISTINCT ?parafia) AS ?liczba_parafii)
WHERE {
?archidiakonat wdt:P27 wd:Q722 .
?dekanat wdt:P27 wd:Q719 ;
wdt:P37 ?archidiakonat .
?parafia wdt:P27 wd:Q714 ;
wdt:P37 ?dekanat .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?archidiakonat ?archidiakonatLabel
ORDER BY ?archidiakonatLabel
Number of settlements and districts in the palatinates in the 16th century
#title:Number of settlements and districts in the palatinates in the 16th century
SELECT ?palatinate ?palatinateLabel (COUNT(DISTINCT ?district) AS ?num_districts) (COUNT(DISTINCT ?settlement) AS ?num_settlements)
WHERE {
?palatinate wdt:P27 wd:Q905 .
?district wdt:P27 wd:Q903 ;
wdt:P37 ?palatinate .
?settlement wdt:P27 wd:Q175698 ;
wdt:P70 ?district .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
GROUP BY ?palatinate ?palatinateLabel
ORDER BY ?palatinateLabel
Cities in the palatinates in the 16th century
#title:Cities in the palatinates in the 16th century
#defaultView:Map
SELECT ?palatinate ?palatinateLabel ?district ?districtLabel ?city ?cityLabel ?coordinate ?layer
WHERE {
?palatinate wdt:P27 wd:Q905 .
?district wdt:P27 wd:Q903 ;
wdt:P37 ?palatinate .
?city wdt:P27 wd:Q175698 ;
wdt:P70 ?district .
?city p:P62 ?statement1 .
?statement1 pq:P40 ?pointintime1 .
?statement1 (ps:P62/(wdt:P56*)) wd:Q622 .
?city p:P63 ?statement .
?statement ps:P63 ?coordinate .
?statement pq:P40 ?pointintime .
?palatinate rdfs:label ?layer .
FILTER(YEAR(?pointintime) = 1600 && LANG(?layer) = "en")
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}