Wikidata:WikiProject Slovakia/Showcase Queries

From Wikidata
Jump to navigation Jump to search

Home

 

Slovak Properties

 

Showcase Queries

 

Events

 

People of Slovakia by the number of sitelinks[edit]

The following query uses these:

  • Properties: instance of (P31)  View with Reasonator View with SQID, place of birth (P19)  View with Reasonator View with SQID, country (P17)  View with Reasonator View with SQID, date of birth (P569)  View with Reasonator View with SQID, date of death (P570)  View with Reasonator View with SQID, place of death (P20)  View with Reasonator View with SQID
    select distinct ?itemLabel ?item ?number ?dob ?pobLabel ?dod ?podLabel
    with { # select all the numbers of sitelinks
      select ?number (count(*) as ?total) {
        [] wikibase:sitelinks ?number .
      } group by ?number
    } as %numbers
    where {
      include %numbers .
      filter (?number > 40) .
      ?item wikibase:sitelinks ?number .
      ?item wdt:P31 wd:Q5.
      ?item wdt:P19 ?pob.
      ?pob wdt:P17 wd:Q214.
      OPTIONAL { ?item wdt:P569 ?dob }
      OPTIONAL { ?item wdt:P570 ?dod } 
      OPTIONAL { ?item wdt:P20 ?pod }  
      ?sitelink <http://schema.org/about> ?item .
      service wikibase:label { bd:serviceParam wikibase:language "sk,en". }
    } order by desc(?number)
    

Map of railway lines[edit]

The following query uses these:

Features: map (Q24515275)  View with Reasonator View with SQID

#defaultView:Map{"hide":["?coord1", "?coord1lat", "?coord1lon", "?coord2", "?coord2lat", "?coord2lon", "?str", "?line"]}
SELECT * WHERE {
  ?comm1 wdt:P31/wdt:P279*/wdt:P361 wd:Q22667 ; wdt:P17 wd:Q214 ; wdt:P625 ?coord1 ; wdt:P197 ?comm2 .
  MINUS { ?comm1 p:P31 [ ps:P31 wd:Q55488 ; pq:P582 [] ] } .
  MINUS { ?comm2 p:P31 [ ps:P31 wd:Q55488 ; pq:P582 [] ] } .
  MINUS { ?comm1 p:P31 [ ps:P31 wd:Q928830 ] } .
  MINUS { ?comm2 p:P31 [ ps:P31 wd:Q928830 ] } .
  ?comm2 wdt:P625 ?coord2 .
  ?comm1 p:P625 [ ps:P625 []; psv:P625 [ wikibase:geoLongitude ?coord1lon; wikibase:geoLatitude ?coord1lat; ] ] .
  ?comm2 p:P625 [ ps:P625 []; psv:P625 [ wikibase:geoLongitude ?coord2lon; wikibase:geoLatitude ?coord2lat; ] ] .
  BIND(CONCAT('LINESTRING (', STR(?coord1lon), ' ', STR(?coord1lat), ',', STR(?coord2lon), ' ', STR(?coord2lat), ')') AS ?str) .
  BIND(STRDT(?str, geo:wktLiteral) AS ?line) .
}

List of Slovak companies by revenue[edit]

The following query uses these: