query-baa2f6b9b9b1daca013108257531d8d3
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?name ?followers ?subscribers WHERE
{
{
FILTER (!CONTAINS(?name, "@respublicae.eu"))
?item p:P4033 ?stat .
?stat ps:P4033 ?name .
OPTIONAL {?stat pq:P8687 ?followers . }
OPTIONAL {?stat pq:P3744 ?subscribers . }
}
UNION
{
FILTER (!CONTAINS(?name, "@respublicae.eu"))
?item p:P8687 ?stat .
?stat ps:P8687 ?followers .
?stat pq:P4033 ?name .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY (!bound(?followers)) ?followers (!bound(?subscribers)) ?subscribers
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?followers"):::projected
v4("?item"):::projected
v3("?name"):::projected
v5("?stat")
v2("?subscribers"):::projected
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
f0[["not contains(?name,'@respublicae.eu')"]]
f0 --> v3
v4 --"p:P8687"--> v5
v5 --"p:statement/P8687"--> v1
v5 --"p:qualifier/P4033"--> v3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
f1[["not contains(?name,'@respublicae.eu')"]]
f1 --> v3
v4 --"p:P4033"--> v5
v5 --"p:statement/P4033"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:qualifier/P8687".-> v1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:qualifier/P3744".-> v2
end
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end