query-24004443b1b1b583a52662fe148a044a
Compteur de liens pour plusieurs articles
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?article ?gender ?genderLabel (COUNT(?item) AS ?count)
WHERE {
VALUES ?article {
"Sociologie"
"Économie (discipline)"
"Philosophie"
}
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "fr.wikipedia.org";
wikibase:api "Generator";
mwapi:generator "links";
mwapi:titles ?article ;.
?item wikibase:apiOutputItem mwapi:item.
}
FILTER BOUND (?item) # Safeguard to not get a timeout from unbound items when using ?item below
?item wdt:P21 ?gender .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?article ?gender ?genderLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?article"):::projected
v4("?count")
v3("?gender"):::projected
v1("?item"):::projected
c11(["mwapi:item"]):::iri
c4(["fr.wikipedia.org"]):::literal
c2(["bd:serviceParam"]):::iri
c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c8(["links"]):::literal
c6(["Generator"]):::literal
f0[["bound(?item)"]]
f0 --> v1
bind1[/VALUES ?article/]
bind1-->v2
bind10(["Sociologie"])
bind10 --> bind1
bind11(["Économie (discipline)"])
bind11 --> bind1
bind12(["Philosophie"])
bind12 --> bind1
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c2 --"mwapi:endpoint"--> c4
c2 --"mwapi:api"--> c6
c2 --"mwapi:generator"--> c8
c2 --"mwapi:titles"--> v2
v1 --"mwapi:apiOutputItem"--> c11
end
v1 --"wdt:P21"--> v3
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c2 --"mwapi:language"--> c15
end
bind3[/"count(?item)"/]
v1 --o bind3
bind3 --as--o v4