query-9e689b4d606968847afc41c8408a1a51
15:55, 4 May 2022 (UTC) divudì"this isn't even my final form!" LOL other tweaks. like it very much!
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 bd: <http://www.bigdata.com/rdf#>
#defaultView:Graph
select ?person ?linkedPerson ?linkedPersonLabel ?type ?personLabel (?type as ?edgeLabel) {
?person wdt:P937 wd:Q641.
{?person wdt:P106 wd:Q175151 } UNION {?person wdt:P106 wd:Q1229025} UNION {?person wdt:P106 wd:Q998550} UNION {?person wdt:P106 wd:Q2516866}UNION {?person wdt:P106 wd:Q40881196}
{ ?person wdt:P2032 ?datafine } UNION { ?person wdt:P570 ?datafine }
{ ?person wdt:P1327 ?linkedPerson . bind("business partner" as ?type) } union
{ ?person wdt:P22 ?linkedPerson . bind("father" as ?type) } union
{ ?person wdt:P23 ?linkedPerson . bind("mother" as ?type) } union
{ ?person wdt:P40 ?linkedPerson . bind("son" as ?type) } union
{ ?person wdt:P26 ?linkedPerson . bind("partner" as ?type) }
FILTER ("1850-01-01"^^xsd:date > ?datafine)
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" . }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?datafine")
v5("?edgeLabel")
v3("?linkedPerson"):::projected
v2("?person"):::projected
v5("?type"):::projected
c9(["wd:Q40881196"]):::iri
c5(["wd:Q175151"]):::iri
c8(["wd:Q2516866"]):::iri
c7(["wd:Q998550"]):::iri
c3(["wd:Q641"]):::iri
c18(["bd:serviceParam"]):::iri
c6(["wd:Q1229025"]):::iri
c20(["it,en"]):::literal
f0[["'1850-01-01^^xsd:date' > ?datafine"]]
f0 --> v1
v2 --"wdt:P937"--> c3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P106"--> c9
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P106"--> c8
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P106"--> c7
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P106"--> c6
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P106"--> c5
end
union0r <== or ==> union0l
end
subgraph union4[" Union "]
subgraph union4l[" "]
style union4l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P570"--> v1
end
subgraph union4r[" "]
style union4r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P2032"--> v1
end
union4r <== or ==> union4l
end
subgraph union5[" Union "]
subgraph union5l[" "]
style union5l fill:#abf,stroke-dasharray: 3 3;
subgraph union6[" Union "]
subgraph union6l[" "]
style union6l fill:#abf,stroke-dasharray: 3 3;
subgraph union7[" Union "]
subgraph union7l[" "]
style union7l fill:#abf,stroke-dasharray: 3 3;
subgraph union8[" Union "]
subgraph union8l[" "]
style union8l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P26"--> v3
bind1[/"'partner'"/]
bind1 --as--o v5
end
subgraph union8r[" "]
style union8r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P40"--> v3
bind2[/"'son'"/]
bind2 --as--o v5
end
union8r <== or ==> union8l
end
end
subgraph union7r[" "]
style union7r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P23"--> v3
bind3[/"'mother'"/]
bind3 --as--o v5
end
union7r <== or ==> union7l
end
end
subgraph union6r[" "]
style union6r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P22"--> v3
bind4[/"'father'"/]
bind4 --as--o v5
end
union6r <== or ==> union6l
end
end
subgraph union5r[" "]
style union5r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P1327"--> v3
bind5[/"'business partner'"/]
bind5 --as--o v5
end
union5r <== or ==> union5l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c18 --"wikibase:language"--> c20
end
bind6[/"?type"/]
v5 --o bind6
bind6 --as--o v5