query-3edc112c6b9a58865380e5b37b335560
Social mediaMPs and their twitter accounts
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
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 ?username ?followers ?date
where {
?item p:P39 ?ps . ?ps ps:P39 wd:Q30524710 .
?item wdt:P2002 ?username . # select best only
?item p:P2002 ?ts . ?ts ps:P2002 ?username . optional { ?ts pq:P3744 ?followers . }
optional { ?ts prov:wasDerivedFrom [ pr:P813 ?date ] . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?date"):::projected
v5("?followers"):::projected
v1("?item"):::projected
v2("?ps")
v4("?ts")
v3("?username"):::projected
a1((" "))
c3(["wd:Q30524710"]):::iri
c11(["bd:serviceParam"]):::iri
c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"p:P39"--> v2
v2 --"p:statement/P39"--> c3
v1 --"p:direct/P2002"--> v3
v1 --"p:P2002"--> v4
v4 --"p:statement/P2002"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P3744".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
a1 -."p:reference/P813".-> v6
v4 --"prov:wasDerivedFrom"--> a1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end