query-ff8dd047e874acbae63332c8b5f13253
TODO
Use at
- https://query.wikidata.org/sparql
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#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
#List of episodes with episode number per season and aggregated comma-separated guests
SELECT DISTINCT ?episode ?no_episode ?no_episode_saison ?date ?episodeLabel (GROUP_CONCAT(DISTINCT ?guestLabel; SEPARATOR = ", ") AS ?liste_invites) (URI(CONCAT("https://www.youtube.com/watch?v=", ?youtube)) AS ?lien_youtube)
WHERE {
?episode (wdt:P31/wdt:P279*) wd:Q1983062.
?episode p:P179 ?statement.
?episode p:P4908 ?season.
OPTIONAL { ?episode wdt:P5030 ?guest. }
?episode wdt:P577 ?date.
?statement ps:P179 wd:Q56816469.
?statement pq:P1545 ?no_episode.
?season pq:P1545 ?no_episode_saison.
OPTIONAL { ?episode wdt:P1651 ?youtube. }
SERVICE wikibase:label {
bd:serviceParam wikibase:language "fr,en".
?guest rdfs:label ?guestLabel.
?episode rdfs:label ?episodeLabel.
}
}
GROUP BY ?episode ?no_episode ?no_episode_saison ?date ?episodeLabel ?youtube
ORDER BY DESC(xsd:integer(?no_episode))
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?date"):::projected
v2("?episode"):::projected
v10("?episodeLabel"):::projected
v5("?guest")
v9("?guestLabel"):::projected
v12("?lien_youtube")
v11("?liste_invites")
v1("?no_episode"):::projected
v7("?no_episode_saison"):::projected
v4("?season")
v3("?statement")
v8("?youtube"):::projected
a1((" "))
c9(["wd:Q56816469"]):::iri
c3(["wd:Q1983062"]):::iri
c13(["bd:serviceParam"]):::iri
c15(["fr,en"]):::literal
v2 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c3
v2 --"p:P179"--> v3
v2 --"p:P4908"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P5030".-> v5
end
v2 --"p:direct/P577"--> v6
v3 --"p:statement/P179"--> c9
v3 --"p:qualifier/P1545"--> v1
v4 --"p:qualifier/P1545"--> v7
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P1651".-> v8
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
v5 --"rdfs:label"--> v9
v2 --"rdfs:label"--> v10
end
bind1[/"?guestLabel"/]
v9 --o bind1
bind1 --as--o v11
bind2[/"concat('https://www.youtube.com/watch?v=',?youtube)"/]
v8 --o bind2
bind2 --as--o v12