query-3c7d248db954d346cba31bc9bef58530

rq turtle/ttl

TODO

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item
   WHERE {
     {
       ?item wdt:P802 ?item2;
             p:P580/psv:P580 ?start1_node .
       ?start1_node wikibase:timeValue ?start1;
                    wikibase:timePrecision "11"^^xsd:integer .
       {
         ?item2 p:P582/psv:P582 ?end2_node .
         ?end2_node wikibase:timeValue ?end2;
                      wikibase:timePrecision "11"^^xsd:integer .
         FILTER (?start1 > ?end2)
       } UNION {
         ?item2 p:P570/psv:P570 ?death2_node .
         ?death2_node wikibase:timeValue ?death2;
                      wikibase:timePrecision "11"^^xsd:integer .
         FILTER (?start1 > ?death2)
       } UNION {
         ?item2 p:P576/psv:P576 ?dissolution2_node .
         ?dissolution2_node wikibase:timeValue ?dissolution2;
                      wikibase:timePrecision "11"^^xsd:integer .
         FILTER (?start1 > ?dissolution2)
       }
     } UNION {
       ?item wdt:P802 ?item2;
             p:P569/psv:P569 ?birth1_node .
       ?birth1_node wikibase:timeValue ?birth1;
                    wikibase:timePrecision "11"^^xsd:integer .
       {
         ?item2 p:P582/psv:P582 ?end2_node .
         ?end2_node wikibase:timeValue ?end2;
                      wikibase:timePrecision "11"^^xsd:integer .
         FILTER (?birth1 > ?end2)
       } UNION {
         ?item2 p:P570/psv:P570 ?death2_node .
         ?death2_node wikibase:timeValue ?death2;
                      wikibase:timePrecision "11"^^xsd:integer .
         FILTER (?birth1 > ?death2)
       } UNION {
         ?item2 p:P576/psv:P576 ?dissolution2_node .
         ?dissolution2_node wikibase:timeValue ?dissolution2;
                      wikibase:timePrecision "11"^^xsd:integer .
         FILTER (?birth1 > ?dissolution2)
       }
     } UNION {
       ?item wdt:P802 ?item2;
             p:P571/psv:P571 ?inception1_node .
       ?inception1_node wikibase:timeValue ?inception1;
                    wikibase:timePrecision "11"^^xsd:integer .
       {
         ?item2 p:P582/psv:P582 ?end2_node .
         ?end2_node wikibase:timeValue ?end2;
                      wikibase:timePrecision "11"^^xsd:integer .
         FILTER (?inception1 > ?end2)
       } UNION {
         ?item2 p:P570/psv:P570 ?death2_node .
         ?death2_node wikibase:timeValue ?death2;
                      wikibase:timePrecision "11"^^xsd:integer .
         FILTER (?inception1 > ?death2)
       } UNION {
         ?item2 p:P576/psv:P576 ?dissolution2_node .
         ?dissolution2_node wikibase:timeValue ?dissolution2;
                      wikibase:timePrecision "11"^^xsd:integer .
         FILTER (?inception1 > ?dissolution2)
       }
     }
   }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v12("?birth1") v11("?birth1_node") v7("?death2") v8("?death2_node") v9("?dissolution2") v10("?dissolution2_node") v5("?end2") v6("?end2_node") v14("?inception1") v13("?inception1_node") v1("?item"):::projected v2("?item2") v4("?start1") v3("?start1_node") a1((" ")) a2((" ")) a3((" ")) a4((" ")) a5((" ")) a6((" ")) a7((" ")) a8((" ")) a9((" ")) a10((" ")) a11((" ")) a12((" ")) c6(["11^^xsd:integer"]):::literal 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; v1 --"p:direct/P802"--> v2 v1 --"p:P571"--> a9 a9 --"p:statement/value/P571"--> v13 v13 --"wikibase:timeValue"--> v14 v13 --"wikibase:timePrecision"--> c6 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; f0[["?inception1 > ?dissolution2"]] f0 --> v14 f0 --> v9 v2 --"p:P576"--> a12 a12 --"p:statement/value/P576"--> v10 v10 --"wikibase:timeValue"--> v9 v10 --"wikibase:timePrecision"--> c6 end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; f1[["?inception1 > ?death2"]] f1 --> v14 f1 --> v7 v2 --"p:P570"--> a11 a11 --"p:statement/value/P570"--> v8 v8 --"wikibase:timeValue"--> v7 v8 --"wikibase:timePrecision"--> c6 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; f2[["?inception1 > ?end2"]] f2 --> v14 f2 --> v5 v2 --"p:P582"--> a10 a10 --"p:statement/value/P582"--> v6 v6 --"wikibase:timeValue"--> v5 v6 --"wikibase:timePrecision"--> c6 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"p:direct/P802"--> v2 v1 --"p:P569"--> a5 a5 --"p:statement/value/P569"--> v11 v11 --"wikibase:timeValue"--> v12 v11 --"wikibase:timePrecision"--> c6 subgraph union4[" Union "] subgraph union4l[" "] style union4l fill:#abf,stroke-dasharray: 3 3; subgraph union5[" Union "] subgraph union5l[" "] style union5l fill:#abf,stroke-dasharray: 3 3; f3[["?birth1 > ?dissolution2"]] f3 --> v12 f3 --> v9 v2 --"p:P576"--> a8 a8 --"p:statement/value/P576"--> v10 v10 --"wikibase:timeValue"--> v9 v10 --"wikibase:timePrecision"--> c6 end subgraph union5r[" "] style union5r fill:#abf,stroke-dasharray: 3 3; f4[["?birth1 > ?death2"]] f4 --> v12 f4 --> v7 v2 --"p:P570"--> a7 a7 --"p:statement/value/P570"--> v8 v8 --"wikibase:timeValue"--> v7 v8 --"wikibase:timePrecision"--> c6 end union5r <== or ==> union5l end end subgraph union4r[" "] style union4r fill:#abf,stroke-dasharray: 3 3; f5[["?birth1 > ?end2"]] f5 --> v12 f5 --> v5 v2 --"p:P582"--> a6 a6 --"p:statement/value/P582"--> v6 v6 --"wikibase:timeValue"--> v5 v6 --"wikibase:timePrecision"--> c6 end union4r <== or ==> union4l end end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"p:direct/P802"--> v2 v1 --"p:P580"--> a1 a1 --"p:statement/value/P580"--> v3 v3 --"wikibase:timeValue"--> v4 v3 --"wikibase:timePrecision"--> c6 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; f6[["?start1 > ?dissolution2"]] f6 --> v4 f6 --> v9 v2 --"p:P576"--> a4 a4 --"p:statement/value/P576"--> v10 v10 --"wikibase:timeValue"--> v9 v10 --"wikibase:timePrecision"--> c6 end subgraph union7r[" "] style union7r fill:#abf,stroke-dasharray: 3 3; f7[["?start1 > ?death2"]] f7 --> v4 f7 --> v7 v2 --"p:P570"--> a3 a3 --"p:statement/value/P570"--> v8 v8 --"wikibase:timeValue"--> v7 v8 --"wikibase:timePrecision"--> c6 end union7r <== or ==> union7l end end subgraph union6r[" "] style union6r fill:#abf,stroke-dasharray: 3 3; f8[["?start1 > ?end2"]] f8 --> v4 f8 --> v5 v2 --"p:P582"--> a2 a2 --"p:statement/value/P582"--> v6 v6 --"wikibase:timeValue"--> v5 v6 --"wikibase:timePrecision"--> c6 end union6r <== or ==> union6l end end union0r <== or ==> union0l end