query-1f3aba02ad34a9c4f3f4decc36e9e717
(Potential) rowing twins
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item1 ?item1Label ?item2 ?item2Label ?dob ?coc ?gender ?sibling1 ?sibling2 WHERE {
{
SELECT DISTINCT ?item1 ?dob ?coc ?gender WHERE {
?item1 p:P106/ps:P106/wdt:P279* wd:Q26270618; p:P569 [ psv:P569 [ wikibase:timeValue ?dob; wikibase:timePrecision 11 ] ]; wdt:P27 ?coc; wdt:P21 ?gender .
}
}.
?item2 p:P106/ps:P106/wdt:P279* wd:Q26270618; p:P569 [ psv:P569 [ wikibase:timeValue ?dob; wikibase:timePrecision 11 ] ]; wdt:P27 ?coc; wdt:P21 ?gender .
FILTER(xsd:integer(STRAFTER(STR(?item1), 'Q')) < xsd:integer(STRAFTER(STR(?item2), 'Q'))) .
OPTIONAL {
?item1 p:P3373 ?sibling2s .
?sibling2s ps:P3373 ?sibling2 .
FILTER(?sibling2 = ?item2) .
}
OPTIONAL {
?item2 p:P3373 ?sibling1s .
?sibling1s ps:P3373 ?sibling1 .
FILTER(?sibling1 = ?item1) .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?coc"):::projected
v5("?dob"):::projected
v7("?gender"):::projected
v2("?item1"):::projected
v3("?item2"):::projected
v1("?sibling1"):::projected
v9("?sibling1s")
v4("?sibling2"):::projected
v8("?sibling2s")
a1((" "))
a2((" "))
a4((" "))
a3((" "))
a5((" "))
a6((" "))
a8((" "))
a7((" "))
c8(["11^^xsd:integer"]):::literal
c18(["en"]):::literal
c16(["bd:serviceParam"]):::iri
c5(["wd:Q26270618"]):::iri
f0[["http://www.w3.org/2001/XMLSchema#integer(substring-after(str(?item1),'Q')) < http://www.w3.org/2001/XMLSchema#integer(substring-after(str(?item2),'Q'))"]]
f0 --> v2
f0 --> v3
v2 --"p:P106"--> a1
a1 --"p:statement/P106"--> a2
a2 --"p:direct/P279"--> c5
a3 --"wikibase:timeValue"--> v5
a3 --"wikibase:timePrecision"--> c8
a4 --"p:statement/value/P569"--> a3
v2 --"p:P569"--> a4
v2 --"p:direct/P27"--> v6
v2 --"p:direct/P21"--> v7
v3 --"p:P106"--> a5
a5 --"p:statement/P106"--> a6
a6 --"p:direct/P279"--> c5
a7 --"wikibase:timeValue"--> v5
a7 --"wikibase:timePrecision"--> c8
a8 --"p:statement/value/P569"--> a7
v3 --"p:P569"--> a8
v3 --"p:direct/P27"--> v6
v3 --"p:direct/P21"--> v7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:P3373".-> v8
v8 --"p:statement/P3373"--> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:P3373".-> v9
v9 --"p:statement/P3373"--> v1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c16 --"wikibase:language"--> c18
end