User:Mike Krüger/Abfragen

From Wikidata
Jump to navigation Jump to search

Biologie[edit]

# Passer species
# added 2020-04
# defaultView:Table
PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item ?itemLabel ?wissenschaftlicher_Name ?Alias ?article ?Bild ?itemDescription
WHERE {
  ?item wdt:P31 wd:Q16521;
    wdt:P105 wd:Q7432;
    (wdt:P171*) wd:Q28753.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
  OPTIONAL { ?item wdt:P225 ?wissenschaftlicher_Name. }
  OPTIONAL { ?article schema:about ?item; schema:isPartOf <https://de.wikipedia.org/>. }
  OPTIONAL { ?item wdt:P18 ?Bild. }
}
ORDER BY (?itemLabel)
Try it!

Podcastliste[edit]

SELECT ?item ?itemLabel ?title2 ?pq_obj ?date ?duration ?url # ?pq_objLabel
WHERE { ?item p:P179 ?statement.   ?statement ps:P179 wd:Q63386294;   
pq:P1545 ?pq_obj. ?pq_qual wikibase:qualifier pq:P1545.
OPTIONAL { ?item wdt:P1680 ?title2 . } # Untertitel
OPTIONAL { ?item wdt:P577 ?date . } # Veröffentlichungsdatum
OPTIONAL { ?item wdt:P2047 ?duration . } # Dauer
OPTIONAL { ?item wdt:P856 ?url . } # Volltext-URL
SERVICE wikibase:label { bd:serviceParam wikibase:language "de". } }

ORDER BY ASC(?date)
Try it!

Wikidata-Wikipedia-Koordinatensuche im Umkreis um Wikidata-Objekt[edit]

SELECT DISTINCT ?place ?placeLabel ?placeDescription ?location ?dist ?article ?Bild ?is_aLabel WHERE
{
  wd:Q502668 wdt:P625 ?arcLoc . # Wikidata-Objekt zur Umkreissuche, z.B. Rosenbach
  SERVICE wikibase:around {
      ?place wdt:P625 ?location .
      bd:serviceParam wikibase:center ?arcLoc .
      bd:serviceParam wikibase:radius "30" . # Entfernungsangabe in km
      bd:serviceParam wikibase:distance ?dist .
                          }
  SERVICE wikibase:label {bd:serviceParam wikibase:language "de" .}
  # FILTER EXISTS { ?place wdt:P31/wdt:P279* wd:Q3947 } optional falls z.B. nur Häuser gewünscht sind
  OPTIONAL { ?article schema:about ?place; schema:isPartOf <https://de.wikipedia.org/> . }
  OPTIONAL { ?place wdt:P18 ?Bild . }
  OPTIONAL { ?place wdt:P31 ?is_a . }
} ORDER BY ASC(?dist)
# LIMIT 1000 beim Testen
Try it!

World Heritage Sites (Welterbestätten mit Koordinaten)[edit]

SELECT DISTINCT ?Refnr ?item ?itemLabel ?itemDescription ?coords ?image
WHERE {
?item p:P1435 ?statement0.
      ?statement0 (ps:P1435/(wdt:P279*)) wd:Q9259.
  OPTIONAL { ?item wdt:P625 ?coords . }
  OPTIONAL { ?item wdt:P18 ?image . }
  OPTIONAL { ?item wdt:P757 ?Refnr . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de" . }
}
GROUP BY ?item ?itemLabel ?itemDescription ?coords ?image ?Refnr
ORDER BY ?Refnr
Try it!

Geschichte[edit]

SELECT DISTINCT ?item ?itemLabel ?Zeitpunkt ?Startzeitpunkt ?Endzeitpunkt ?Zeitraum ?coords ?Teilvon ?TeilvonLabel ?article ?Bild
WHERE {
  ?item wdt:P31/wdt:P279* wd:Q178561;
       wdt:P625 ?coords .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de" . }
  OPTIONAL { ?item wdt:P585 ?Zeitpunkt. }
  OPTIONAL { ?item wdt:P580 ?Startzeitpunkt. }
  OPTIONAL { ?item wdt:P582 ?Endzeitpunkt. }
  OPTIONAL { ?item wdt:P2348 ?Zeitraum. }
  OPTIONAL { ?item wdt:P361 ?Teilvon. }
  OPTIONAL { ?article schema:about ?item; schema:isPartOf <https://de.wikipedia.org/>. }
  OPTIONAL { ?item wdt:P18 ?Bild. }
}
ORDER BY ?Zeitpunkt ?Startzeitpunkt
Try it!