query-8c169cc7887cb28f4ddab1c6bb543798

rq turtle/ttl

History of the launches of the Soyuz program SELECT DISTINCT ?item ?itemLabel ?launchdate ?launchsiteLabel WHERE { ?item wdt:P31/wdt:P279* wd:Q5916. # Instance of any subclass of spaceflight ?item wdt:P361 wd:Q207329. # Part of the soyuz program OPTIONAL { ?item p:P793 [ ps:P793 wd:Q797476; # Key events > rocket launch pq:P585 ?launchdate # "date" qualifier ]. }

OPTIONAL { ?item p:P793 [ ps:P793 wd:Q797476; # Key events > rocket launch pq:P276 ?launchsite # "date" qualifier ]. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } order by ?launchdate

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#History of the launches of the Soyuz program
SELECT DISTINCT ?item ?itemLabel ?launchdate ?launchsiteLabel
WHERE 
{
  ?item wdt:P31/wdt:P279* wd:Q5916.          # Instance of any subclass of spaceflight
  ?item wdt:P361 wd:Q207329.                 # Part of the soyuz program
  OPTIONAL {
    ?item p:P793 [ ps:P793 wd:Q797476;       # Key events > rocket launch
                   pq:P585 ?launchdate       # "date" qualifier
                 ].
   }

  OPTIONAL {
    ?item p:P793 [ ps:P793 wd:Q797476;       # Key events > rocket launch
                   pq:P276 ?launchsite       # "date" qualifier
                 ].
   }  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
order by ?launchdate

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v1("?launchdate"):::projected v3("?launchsite") a1((" ")) a2((" ")) a3((" ")) c7(["wd:Q797476"]):::iri c3(["wd:Q5916"]):::iri c5(["wd:Q207329"]):::iri c12(["bd:serviceParam"]):::iri c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c3 v2 --"p:direct/P361"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; a2 -."p:statement/P793".-> c7 a2 --"p:qualifier/P585"--> v1 v2 --"p:P793"--> a2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; a3 -."p:statement/P793".-> c7 a3 --"p:qualifier/P276"--> v3 v2 --"p:P793"--> a3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end