User:Kghbln/queries

REM: SPARQL

Query for all Semantic MediaWiki versions and show their release datesEdit

Created via the "Request a query" service

Syntax
SELECT ?wiki_software ?wiki_softwareLabel ?software_version_identifier ?date WHERE {
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
  }
  ?wiki_software wdt:P31 wd:Q6686945; rdfs:label ?wiki_softwareLabel.
  FILTER ( ( LANG (?wiki_softwareLabel) ) = "en" )
  FILTER ( ( STR (?wiki_softwareLabel) ) = "MediaWiki" )
  OPTIONAL {
    ?wiki_software p:P348 ?stat.
    ?stat ps:P348 ?software_version_identifier.
    OPTIONAL {
      ?stat pq:P577 ?date.
    }
  }
}
ORDER BY (?date)
LIMIT 1000
Result

Query service

Query for all extensions that depend on Semantic MediaWikiEdit

Syntax
SELECT ?Semantic_MediaWiki ?Semantic_MediaWikiLabel ?depends_on_software ?depends_on_softwareLabel WHERE {
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
  }
  ?Semantic_MediaWiki wdt:P31 wd:Q6805426.
  OPTIONAL {
    ?Semantic_MediaWiki wdt:P1547 ?depends_on_software.
  }
  ?Semantic_MediaWiki wdt:P1547 wd:Q20728.
}
LIMIT 1000
Result

Query service

Query for all wikis that use Semantic MediaWikiEdit

Syntax
SELECT ?MediaWiki_Website ?MediaWiki_WebsiteLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?MediaWiki_Website wdt:P31 wd:Q15633582.
  ?MediaWiki_Website wdt:P2283 wd:Q20728.
}
LIMIT 1000
Result

Query service

Query for all extensions that are supported by Professional.WikiEdit

Syntax
SELECT ?ist_ein_e_ ?ist_ein_e_Label ?Version WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?ist_ein_e_ wdt:P31 wd:Q6805426;
    wdt:P126 wd:Q66480889.
  OPTIONAL { ?ist_ein_e_ wdt:P348 ?Version. }
}
LIMIT 1000
Result

Query service

People that died [wdt:P20] in Cham (Switzerland) [wd:Q69235]Edit

# People that died [wdt:P20] in Cham (Switzerland) [wd:Q69235]
SELECT DISTINCT
	?item (?itemlabel AS ?Person) (?itemdescription AS ?Personenbeschreibung)
	?given_name (?given_namelabel AS ?Vorname)
	?family_name (?family_namelabel AS ?Nachname)
	?GND_ID
	?VIAF_ID
	?HDS_ID
WHERE {
	VALUES ?mylang {
		'de'
	}
	?item wdt:P20 wd:Q69235. 
	?item rdfs:label ?itemlabel.
		FILTER ( lang (?itemlabel) = ?mylang ) 
	?item schema:description ?itemdescription.
		FILTER( lang (?itemdescription) = ?mylang )
	OPTIONAL {
		?item wdt:P735 ?given_name. ?given_name rdfs:label ?given_namelabel.
			FILTER ( lang (?given_namelabel) = ?mylang )
	}
	OPTIONAL {
		?item wdt:P734 ?family_name. ?family_name rdfs:label ?family_namelabel.
			FILTER ( lang (?family_namelabel) = ?mylang )
	}
	OPTIONAL {
		?item wdt:P227 ?GND_ID.
	} 
	OPTIONAL {
		?item wdt:P214 ?VIAF_ID.
	}
	OPTIONAL {
		?item wdt:P902 ?HDS_ID.
	}
	SERVICE wikibase:label {
		bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
	}
}


People that died [wdt:P20] in Cham (Switzerland) [wd:Q69235]Edit

SELECT DISTINCT ?item (?itemlabel AS ?Person) (?itemdescription AS ?Personenbeschreibung) ?given_name (?given_namelabel AS ?Vorname) ?family_name (?family_namelabel AS ?Nachname) ?Geburtsdatum ?Sterbedatum WHERE {
  VALUES ?mylang {
    "de"
  }
  ?item wdt:P20 wd:Q69235;
    rdfs:label ?itemlabel.
  FILTER((LANG(?itemlabel)) = ?mylang)
  ?item schema:description ?itemdescription.
  FILTER((LANG(?itemdescription)) = ?mylang)
  OPTIONAL {
    ?item wdt:P735 ?given_name.
    ?given_name rdfs:label ?given_namelabel.
    FILTER((LANG(?given_namelabel)) = ?mylang)
  }
  OPTIONAL {
    ?item wdt:P734 ?family_name.
    ?family_name rdfs:label ?family_namelabel.
    FILTER((LANG(?family_namelabel)) = ?mylang)
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  OPTIONAL { ?item wdt:P569 ?Geburtsdatum. }
  OPTIONAL { ?item wdt:P570 ?Sterbedatum. }
}