query-b55729ab41b88d89840dae9112f48c5d

rq turtle/ttl

TODO

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
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#>
SELECT DISTINCT ?episode ?guestLabel ?genderLabel ?numero_episode ?occupationLabel
WHERE {
  ?episode (wdt:P31/(wdt:P279*)) wd:Q1983062;
    p:P179 ?statement;
    wdt:P5030 ?guest.
  ?statement ps:P179 wd:Q56816469;
    pq:P1545 ?numero_episode.
  ?guest wdt:P21 ?gender.
  OPTIONAL { ?guest wdt:P106 ?occupation. }
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "fr,en".
    ?guest rdfs:label ?guestLabel.
    ?gender rdfs:label ?genderLabel.
    ?occupation rdfs:label ?occupationLabel.
  }
}
ORDER BY ASC(xsd:integer(?numero_episode))

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?episode"):::projected v5("?gender") v8("?genderLabel"):::projected v4("?guest") v7("?guestLabel"):::projected v1("?numero_episode"):::projected v6("?occupation") v9("?occupationLabel"):::projected v3("?statement") a1((" ")) c7(["wd:Q56816469"]):::iri c3(["wd:Q1983062"]):::iri c12(["bd:serviceParam"]):::iri c14(["fr,en"]):::literal v2 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c3 v2 --"p:P179"--> v3 v2 --"p:direct/P5030"--> v4 v3 --"p:statement/P179"--> c7 v3 --"p:qualifier/P1545"--> v1 v4 --"p:direct/P21"--> v5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P106".-> v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 v4 --"rdfs:label"--> v7 v5 --"rdfs:label"--> v8 v6 --"rdfs:label"--> v9 end