User:TweetsFactsAndQueries/Queries/statements with more than one pair of start and end time
Originally written for Moebeus on Telegram.
SELECT ?statement ?subject ?subjectLabel ?propertyLabel ?valueLabel ?start1 ?end1 ?start2 ?end2 WITH {
SELECT * WHERE {
?statement pq:P580 ?start1, ?start2;
pq:P582 ?end1, ?end2.
FILTER(?start1 < ?end1
&& ?end1 < ?start2
&& ?start2 < ?end2)
}
LIMIT 100
} AS %results WHERE {
INCLUDE %results.
?property wikibase:claim ?p;
wikibase:statementProperty ?ps.
?subject ?p ?statement.
?statement ?ps ?value;
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}