query-3215fed1fbd5db120ca26e2cd029edd0

rq turtle/ttl

Bouzinac

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?entity ?entityLabel ?property ?propertyLabel ?qualifier ?qualifierLabel ?timevalue ?precision 
WHERE
{
  VALUES ?precision { 11 10 9 8 } # Precision is day (11), month (10), year (9) or decade (8)
  ?time wikibase:timePrecision ?precision.
  ?time wikibase:timeValue ?timevalue. 
  FILTER (?timevalue >= "-0008-00-00"^^xsd:dateTime && ?timevalue < "0010-00-00"^^xsd:dat)

  {
    # ?time used as qualifier
    ?statement ?qualifiervalue ?time.
    ?qualifier wikibase:qualifierValue ?qualifiervalue.
    ?entity ?claim ?statement.
    ?property wikibase:claim ?claim.
  }
  UNION
  {
    # ?time used as main value
    ?statement ?statementvalue ?time.
    ?property wikibase:statementValue ?statementvalue.
    ?property wikibase:claim ?claim.
    ?entity ?claim ?statement.
  }
  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; v8("?claim") v7("?entity"):::projected v2("?precision"):::projected v9("?property"):::projected v6("?qualifier"):::projected v5("?qualifiervalue") v4("?statement") v10("?statementvalue") v3("?time") v1("?timevalue"):::projected c9(["bd:serviceParam"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?timevalue >= '-0008-00-00^^xsd:dateTime'?timevalue < s0010-00-00^^<http://www.w3.org/2001/XMLSchema#dat>'"]] f0 --> v1 bind1[/VALUES ?precision/] bind1-->v2 bind10(["11^^xsd:integer"]) bind10 --> bind1 bind11(["10^^xsd:integer"]) bind11 --> bind1 bind12(["9^^xsd:integer"]) bind12 --> bind1 bind13(["8^^xsd:integer"]) bind13 --> bind1 v3 --"wikibase:timePrecision"--> v2 v3 --"wikibase:timeValue"--> v1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v4 -->v10--> v3 v9 --"wikibase:statementValue"--> v10 v9 --"wikibase:claim"--> v8 v7 -->v8--> v4 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v4 -->v5--> v3 v6 --"wikibase:qualifierValue"--> v5 v7 -->v8--> v4 v9 --"wikibase:claim"--> v8 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end