query-83e61c0e50679470dd0d02df2dbcae52
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
select
?item ?itemLabel ?itemDescription
(GROUP_CONCAT(DISTINCT ?article; SEPARATOR=" ; ") AS ?articles)
(GROUP_CONCAT(DISTINCT ?id; SEPARATOR=" ; ") AS ?ids)
where {
?item wdt:P396 "IT\\ICCU\\CFIV\\013063" .
optional { ?item ?external ?external_id .}
values ?external { wdt:P214 wdt:P213 wdt:P227 wdt:P268 wdt:P950 wdt:P244 wdt:P1986 }
bind(concat(str(?external)," ",?external_id) AS ?id)
optional { ?article schema:about ?item .
FILTER (regex(str(?article), "wikipedia.org" ))
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en". }
}
GROUP BY ?item ?itemLabel ?itemDescription
Query found at
- https://www.wikidata.org/wiki/User:Ep%C3%ACdosis/Queries
- https://www.wikidata.org/wiki/User:Ep%C3%ACdosis/sandbox
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?article"):::projected
v6("?articles")
v5("?external")
v4("?external_id")
v5("?id"):::projected
v7("?ids")
v2("?item"):::projected
c6(["bd:serviceParam"]):::iri
c8(["it,en"]):::literal
c3(["IT\ICCU\CFIV\013063"]):::literal
v2 --"wdt:P396"--> c3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -->v5--> v4
end
bind0[/VALUES ?external/]
bind0-->v5
bind00(["wdt:P214"])
bind00 --> bind0
bind01(["wdt:P213"])
bind01 --> bind0
bind02(["wdt:P227"])
bind02 --> bind0
bind03(["wdt:P268"])
bind03 --> bind0
bind04(["wdt:P950"])
bind04 --> bind0
bind05(["wdt:P244"])
bind05 --> bind0
bind06(["wdt:P1986"])
bind06 --> bind0
bind1[/"concat(str(?external),' ',?external_id)"/]
v5 --o bind1
v4 --o bind1
bind1 --as--o v5
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."schema:about".-> v2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind4[/"?article"/]
v1 --o bind4
bind4 --as--o v6
bind5[/"?id"/]
v5 --o bind5
bind5 --as--o v7