query-aa328e5cb628a4bb02fac4749c8ed9ce

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?launch (count(?tom) as ?crew)
WHERE 
{
  ?item wdt:P31 wd:Q752783.
  ?item wdt:P361 wd:Q1775296.
  optional {?item wdt:P1029 ?tom.}
  optional {?item wdt:P619 ?launch.}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} group by ?item ?itemLabel ?launch order by ?launch

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?crew") v2("?item"):::projected v1("?launch"):::projected v3("?tom"):::projected c4(["wd:Q1775296"]):::iri c8(["bd:serviceParam"]):::iri c2(["wd:Q752783"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P31"--> c2 v2 --"wdt:P361"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P1029".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P619".-> v1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end bind1[/"count(?tom)"/] v3 --o bind1 bind1 --as--o v4