query-91dfbf51535f8e060900b204b60d07b8
Query in timeout Hello, I'd like to perform multiple group_concat but this query times out...? Thanks for the help
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 bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?référendum ?référendumLabel ?date
(GROUP_CONCAT(?paysLabel; SEPARATOR=", ") AS ?pay)
(GROUP_CONCAT(?ressortLabel; SEPARATOR=", ") AS ?ressorts)
(GROUP_CONCAT(?sujetLabel; SEPARATOR=", ") AS ?sujets) ?titre WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?référendum (wdt:P31/(wdt:P279*)) wd:Q43109 ; wdt:P585 ?date; wdt:P17 ?pays.
?pays rdfs:label ?paysLabel.
VALUES ?not_refs {
wd:Q126723767
wd:Q126720322
wd:Q2515494 wd:Q669262
}
MINUS { ?référendum (wdt:P31/(wdt:P279*)) ?not_refs. }
OPTIONAL { ?référendum wdt:P921 ?sujet_principal.
?sujet_principal rdfs:label ?sujetLabel.
FILTER(LANGMATCHES(LANG(?sujetLabel), "[AUTO_LANGUAGE],fr,en")).}
OPTIONAL {
?référendum wdt:P1476 ?titre.
FILTER((LANG(?titre)) = "[AUTO_LANGUAGE],fr")
} OPTIONAL { ?référendum wdt:P1001 ?ressort. ?ressort rdfs:label ?ressortLabel.
FILTER(LANGMATCHES(LANG(?ressortLabel), "[AUTO_LANGUAGE],fr,en")).}
} group by ?référendum ?référendumLabel ?date ?titre
ORDER BY (?date)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?date"):::projected
v8("?not_refs")
v11("?pay")
v6("?pays")
v7("?paysLabel"):::projected
v10("?ressort")
v2("?ressortLabel"):::projected
v12("?ressorts")
v5("?référendum"):::projected
v4("?sujetLabel"):::projected
v9("?sujet_principal")
v13("?sujets")
v3("?titre"):::projected
a1((" "))
a2((" "))
c9(["wd:Q43109"]):::iri
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end
v5 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c9
v5 --"wdt:P585"--> v1
v5 --"wdt:P17"--> v6
v6 --"rdfs:label"--> v7
bind0[/VALUES ?not_refs/]
bind0-->v8
bind00(["wd:Q126723767"])
bind00 --> bind0
bind01(["wd:Q126720322"])
bind01 --> bind0
bind02(["wd:Q2515494"])
bind02 --> bind0
bind03(["wd:Q669262"])
bind03 --> bind0
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v5 --"wdt:P31"--> a2
a2 --"wdt:P279"--> v8
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P921".-> v9
v9 --"rdfs:label"--> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P1476".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P1001".-> v10
v10 --"rdfs:label"--> v2
end
bind5[/"?paysLabel"/]
v7 --o bind5
bind5 --as--o v11
bind6[/"?ressortLabel"/]
v2 --o bind6
bind6 --as--o v12
bind7[/"?sujetLabel"/]
v4 --o bind7
bind7 --as--o v13