Querying: Difference between revisions

Jump to navigation Jump to search
Line 26: Line 26:
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
  }
  }
=== Start and end dates ===
Every region with a start date, as well as end/latest dates where supplied. [https://tinyurl.com/2gn56lb4 run]
PREFIX og: <https://ottgaz.org/entity/>
PREFIX ogs: <https://ottgaz.org/entity/statement/>
PREFIX ogv: <https://ottgaz.org/value/>
PREFIX ogt: <https://ottgaz.org/prop/direct/>
PREFIX ogp: <https://ottgaz.org/prop/>
PREFIX ogps: <https://ottgaz.org/prop/statement/>
PREFIX ogpq: <https://ottgaz.org/prop/qualifier/>
SELECT ?regionLabel ?statusLabel ?starttime ?endtime
WHERE
{
  ?region ogt:P6 og:Q1.
  ?region ogp:P15 ?statement.
  ?statement ogps:P15 ?status.
  ?statement ogpq:P7 ?starttime.
  OPTIONAL{?statement ogpq:P8 ?endtime.}
  OPTIONAL{?statement ogpq:P22 ?endtime.}
   
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
ORDER BY ?starttime


== Federated query with Wikidata ==
== Federated query with Wikidata ==

Navigation menu