query-5e4221b91b9f3e884d9eab75b2d317d8
I would like to ask you if the two following improvements are possible: , e.g. excluding all the values of P214 and P1871 from countexcept one or more specific properties, all the external identifiers (Q11922067)Philumenus obtain a query asking to count, in (i.e. counting P8034 one time instead of three times, P227 one time instead of two times etc.)only once, all the external identifiers (Q11922067)Philumenus obtain a query asking to count, in 07:23, 1 April 2021 (UTC) dosisEpìThank you very much! --
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT (COUNT(DISTINCT ?wdt) as ?count) ?n
WHERE
{
?p wikibase:propertyType wikibase:ExternalId .
?p wikibase:directClaim ?wdt .
wd:Q11922067 ?wdt [] .
wd:Q11922067 wikibase:identifiers ?n .
}
GROUP BY ?n
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?count")
v3("?n"):::projected
v1("?p")
v2("?wdt"):::projected
a1((" "))
c4(["wd:Q11922067"]):::iri
c2(["wikibase:ExternalId"]):::iri
v1 --"wikibase:propertyType"--> c2
v1 --"wikibase:directClaim"--> v2
c4 -->v2--> a1
c4 --"wikibase:identifiers"--> v3
bind1[/"count(?wdt)"/]
v2 --o bind1
bind1 --as--o v4