query-c1194186d3d989a683cff61065c5a0d5
.on Mastodon and on TwitterOriginally posted
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?twin1 ?birth1 ?twin2 ?birth2 ?twin1Label ?birth1Label ?twin2Label ?birth2Label WHERE {
?twin1 wdt:P31 wd:Q5;
wdt:P569 ?birth1;
p:P3373 [
ps:P3373 ?twin2;
pq:P1039/wdt:P279* wd:Q14756018
].
?twin2 wdt:P31 wd:Q5;
wdt:P569 ?birth2.
FILTER(?birth1 != ?birth2)
FILTER(STR(?twin1) < STR(?twin2))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
- https://www.wikidata.org/wiki/User:TweetsFactsAndQueries/Queries/twins_with_different_dates_of_birth
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?birth1"):::projected
v4("?birth2"):::projected
v1("?twin1"):::projected
v2("?twin2"):::projected
a1((" "))
a2((" "))
c10(["bd:serviceParam"]):::iri
c7(["wd:Q14756018"]):::iri
c2(["wd:Q5"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["str(?twin1) < str(?twin2)"]]
f0 --> v1
f0 --> v2
f1[["?birth1 != ?birth2"]]
f1 --> v3
f1 --> v4
v1 --"p:direct/P31"--> c2
v1 --"p:direct/P569"--> v3
a1 --"p:statement/P3373"--> v2
a1 --"p:qualifier/P1039"--> a2
a2 --"p:direct/P279"--> c7
v1 --"p:P3373"--> a1
v2 --"p:direct/P31"--> c2
v2 --"p:direct/P569"--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end