query-87f6d67210f36574180152ab03d973a7
Membres des associations dont le domaine est l'archivistique ou les membres sont archivistes
SELECT ?association ?associationLabel (GROUP_CONCAT(DISTINCT(?MembreLabel); separator=", ") as ?Membres)
WHERE
{
?association wdt:P31/wdt:P279* wd:Q48204.
{?association wdt:P101 wd:Q380313.} UNION {?association wdt:P101 wd:Q517656.} UNION {?association wdt:P3989 wd:Q635734.} UNION {?association wdt:P3989 wd:Q3499285.}
OPTIONAL {?Membre wdt:P463 ?association.
OPTIONAL {?Membre rdfs:label ?MembreLabel. filter(lang(?MembreLabel)="fr") } }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],fr,de,it,en,es".}
}
group by ?association ?associationLabel
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#>
#Membres des associations dont le domaine est l'archivistique ou les membres sont archivistes
SELECT ?association ?associationLabel (GROUP_CONCAT(DISTINCT(?MembreLabel); separator=", ") as ?Membres)
WHERE
{
?association wdt:P31/wdt:P279* wd:Q48204.
{?association wdt:P101 wd:Q380313.} UNION {?association wdt:P101 wd:Q517656.} UNION {?association wdt:P3989 wd:Q635734.} UNION {?association wdt:P3989 wd:Q3499285.}
OPTIONAL {?Membre wdt:P463 ?association.
OPTIONAL {?Membre rdfs:label ?MembreLabel. filter(lang(?MembreLabel)="fr") } }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],fr,de,it,en,es".}
}
group by ?association ?associationLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?Membre")
v2("?MembreLabel"):::projected
v4("?Membres")
v1("?association"):::projected
a1((" "))
c3(["wd:Q48204"]):::iri
c6(["wd:Q517656"]):::iri
c9(["wd:Q3499285"]):::iri
c5(["wd:Q380313"]):::iri
c14(["bd:serviceParam"]):::iri
c8(["wd:Q635734"]):::iri
c16(["#91;AUTO_LANGUAGE#93;,fr,de,it,en,es"]):::literal
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P3989"--> c9
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P3989"--> c8
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P101"--> c6
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P101"--> c5
end
union0r <== or ==> union0l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P463".-> v1
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."rdfs:label".-> v2
end
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c14 --"wikibase:language"--> c16
end
bind1[/"?MembreLabel"/]
v2 --o bind1
bind1 --as--o v4