query-98bbfb42a5466d48c10c86a9e9f1cfcf
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pqv: <http://www.wikidata.org/prop/qualifier/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?date ?count
{
{
SELECT ?item ?date (COUNT(?timevalue ) AS ?count)
WHERE
{
?item wdt:P238 ?airport_code .
?item p:P3872 ?statement .
?statement pqv:P585 ?timevalue .
?statement ps:P3872 ?numberperperiod .
VALUES ?rank { wikibase:NormalRank wikibase:PreferredRank }
?statement wikibase:rank ?rank.
?timevalue wikibase:timeValue ?date .
?timevalue wikibase:timePrecision 10 . # Precicison is month
}
GROUP BY ?item ?itemLabel ?date
HAVING (?count > 1)
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?airport_code")
v9("?count"):::projected
v8("?date"):::projected
v2("?item"):::projected
v6("?numberperperiod")
v7("?rank")
v4("?statement")
v5("?timevalue")
c13(["fr"]):::literal
c11(["bd:serviceParam"]):::iri
c9(["10^^xsd:integer"]):::literal
f0[["?count > '1^^xsd:integer'"]]
f0 --> v9
v2 --"p:direct/P238"--> v3
v2 --"p:P3872"--> v4
v4 --"p:qualifier/value/P585"--> v5
v4 --"p:statement/P3872"--> v6
bind1[/VALUES ?rank/]
bind1-->v7
bind10(["wikibase:NormalRank"])
bind10 --> bind1
bind11(["wikibase:PreferredRank"])
bind11 --> bind1
v4 --"wikibase:rank"--> v7
v5 --"wikibase:timeValue"--> v8
v5 --"wikibase:timePrecision"--> c9
bind3[/"count(?timevalue)"/]
v5 --o bind3
bind3 --as--o v9
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end