question: Find 50 features tagged with 'place', showing their name, place type value, and geometry.

sparql: PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT ?element ?name ?placeType ?geometry WHERE { ?element osmkey:place ?placeType ; osmkey:name ?name ; geo:hasGeometry / geo:asWKT ?geometry . } LIMIT 50


question: Find the locations of all newspaper offices mapped as nodes.

sparql: PREFIX osm: <https://www.openstreetmap.org/> PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT ?node ?geometry WHERE { ?node osmkey:office "newspaper" ; rdf:type osm:node ; geo:hasGeometry / geo:asWKT ?geometry . }


question: Find the locations of all newspaper offices mapped as nodes within the Philippines.

sparql: PREFIX osmrel: <https://www.openstreetmap.org/relation/> PREFIX ogc: <http://www.opengis.net/rdf#> PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT ?element ?geometry WHERE { osmrel:443174 ogc:sfContains ?element . ?element osmkey:office "newspaper" ; geo:hasGeometry / geo:asWKT ?geometry . }


question: Find all named newspaper offices globally.

sparql: PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT ?element ?name WHERE { ?element osmkey:office "newspaper" ; osmkey:name ?name . }


question: Find all newspaper offices globally, showing their name if available.

sparql: PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT ?element ?name WHERE { ?element osmkey:office "newspaper" . OPTIONAL { ?element osmkey:name ?name . } }


question: Find the centroid locations of all named parks globally.

sparql: PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT * WHERE { ?park osmkey:leisure "park" . ?park osmkey:name ?name . ?park geo:hasCentroid / geo:asWKT ?centroid . }


question: Find the locations of maypoles that are outside both Germany and Austria.

sparql: PREFIX osmrel: <https://www.openstreetmap.org/relation/> PREFIX ogc: <http://www.opengis.net/rdf#> PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT * WHERE { ?maypole osmkey:man_made "maypole" . ?maypole geo:hasGeometry / geo:asWKT ?geometry . MINUS { osmrel:51477 ogc:sfIntersects ?maypole . } MINUS { osmrel:16239 ogc:sfIntersects ?maypole . } }


question: Find emergency sirens located within 30 meters of a fire station.

sparql: PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT * WHERE { ?station osmkey:amenity "fire_station" . ?station geo:hasCentroid / geo:asWKT ?station_geometry . ?siren osmkey:emergency "siren" . ?siren geo:hasCentroid / geo:asWKT ?siren_geometry . ?siren_geometry <max-distance-in-meters:30> ?station_geometry . }


question: Calculate the distance between the mapped location of New York City and coordinates (0, 0) in kilometers and miles.

sparql: PREFIX osmnode: <https://www.openstreetmap.org/node/> PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX geof: <http://www.opengis.net/def/function/geosparql/> SELECT * WHERE { osmnode:61785451 geo:hasGeometry / geo:asWKT ?from . BIND ( "POINT(0 0)" ^^ geo:wktLiteral AS ?to ) BIND ( geof:distance ( ?from , ?to ) AS ?kilometers ) BIND ( ?kilometers * 0.62137 AS ?miles ) }


question: Rank municipal boundaries in Oklahoma by how convoluted (least compact) they are, using the Polsby-Popper test.

sparql: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX osm: <https://www.openstreetmap.org/> PREFIX ogc: <http://www.opengis.net/rdf#> PREFIX osm2rdf: <https://osm2rdf.cs.uni-freiburg.de/rdf#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> PREFIX osmrel: <https://www.openstreetmap.org/relation/> SELECT ?boundary ?name ?compactness WHERE { { SELECT ?boundary ( SUM ( ?length ) AS ?perimeter ) WHERE { osmrel:161645 ogc:sfIntersects ?boundary . ?boundary osmkey:boundary "administrative" . ?boundary osmkey:admin_level "8" ^^ xsd:int . ?boundary rdf:type osm:relation . VALUES ?ring { "outer" "inner" } ?boundary osmrel:member [ osmrel:member_id ?way ; osmrel:member_role ?ring ] . ?way osm2rdf:length ?length . } GROUP BY ?boundary } UNION { SELECT ?boundary ( ?length AS ?perimeter ) WHERE { osmrel:161645 ogc:sfIntersects ?boundary . ?boundary osmkey:boundary "administrative" . ?boundary osmkey:admin_level "8" ^^ xsd:int . ?boundary rdf:type osm:way . ?boundary osm2rdf:length ?length . ?boundary osm2rdf:area ?area . ?boundary osmkey:name ?name . } } ?boundary osm2rdf:area ?area . ?boundary osmkey:name ?name . BIND ( 4 * 3.14159 * ?area / ?perimeter / ?perimeter AS ?compactness ) } ORDER BY ?compactness


question: Rank rivers in Alaska by straightness (lowest sinuosity index).

sparql: PREFIX geof: <http://www.opengis.net/def/function/geosparql/> PREFIX ogc: <http://www.opengis.net/rdf#> PREFIX osm2rdf: <https://osm2rdf.cs.uni-freiburg.de/rdf#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX osmway: <https://www.openstreetmap.org/way/> PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX osmrel: <https://www.openstreetmap.org/relation/> SELECT ?river ?channel_length ?downvalley_length ?sinuosity_index WHERE { { SELECT ?river ?source_geometry ?mouth_geometry WHERE { { SELECT ?river ( COUNT ( ?vertex ) - 1 as ?last_pos ) WHERE { ?river osmkey:waterway "river" . osmrel:1116270 ogc:sfIntersects ?river . ?river osmway:member ?vertex . } GROUP BY ?river } ?river osmkey:waterway "river" . osmrel:1116270 ogc:sfIntersects ?river . ?river osmway:member [ osmway:member_id ?first_node ; osmway:member_pos "0" ^^ xsd:int ] . ?first_node geo:hasGeometry / geo:asWKT ?source_geometry . ?river osmway:member [ osmway:member_id ?last_node ; osmway:member_pos ?last_pos ] . ?last_node geo:hasGeometry / geo:asWKT ?mouth_geometry . } } ?river osm2rdf:length ?channel_length . BIND ( geof:distance ( ?source_geometry , ?mouth_geometry ) AS ?downvalley_length ) BIND ( ?channel_length / ?downvalley_length AS ?sinuosity_index ) } ORDER BY ?sinuosity_index


question: List the unique names of streets within Wellington City, New Zealand.

sparql: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX osm: <https://www.openstreetmap.org/> PREFIX ogc: <http://www.opengis.net/rdf#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> PREFIX osmrel: <https://www.openstreetmap.org/relation/> SELECT ?name WHERE { osmrel:4266321 ogc:sfIntersects ?street . VALUES ?street_types { "motorway" "motorway_link" "trunk" "trunk_link" "primary" "primary_link" "secondary" "secondary_link" "tertiary" "tertiary_link" "unclassified" "service" "residential" "living_street" "pedestrian" "busway" "proposed" "construction" } ?street osmkey:highway ?street_types . ?street rdf:type osm:way . ?street osmkey:name ?name . } GROUP BY ?name ORDER BY ASC ( ?name )


question: Find locations in Chicago where at least two streets with different names intersect.

sparql: PREFIX ogc: <http://www.opengis.net/rdf#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> PREFIX osmway: <https://www.openstreetmap.org/way/> PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX osmrel: <https://www.openstreetmap.org/relation/> SELECT ?intersection ?street_names ?geometry WHERE { { SELECT ?intersection ( GROUP_CONCAT ( DISTINCT ?name ; SEPARATOR = " at " ) AS ?street_names ) WHERE { osmrel:122604 ogc:sfContains ?street . ?street osmkey:highway [] . ?street osmkey:name ?name . ?street osmway:member / osmway:member_id ?intersection . } GROUP BY ?intersection HAVING ( COUNT ( DISTINCT ?name ) >= 2 ) } ?intersection geo:hasGeometry / geo:asWKT ?geometry . }


question: Find the longest straight road segments on trunk highways within California.

sparql: PREFIX geof: <http://www.opengis.net/def/function/geosparql/> PREFIX ogc: <http://www.opengis.net/rdf#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> PREFIX osmway: <https://www.openstreetmap.org/way/> PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX osmrel: <https://www.openstreetmap.org/relation/> SELECT ?highway ?pos1 ?node1 ?pos2 ?node2 ?kilometers ?miles WHERE { ?highway osmkey:highway "trunk" . osmrel:165475 ogc:sfIntersects ?highway . ?highway osmway:member [ osmway:member_id ?node1 ; osmway:member_pos ?pos1 ] . ?highway osmway:member [ osmway:member_id ?node2 ; osmway:member_pos ?pos2 ] . FILTER ( ?pos1 + 1 = ?pos2 ) ?node1 geo:hasGeometry / geo:asWKT ?geometry1 . ?node2 geo:hasGeometry / geo:asWKT ?geometry2 . BIND ( geof:distance ( ?geometry1 , ?geometry2 ) AS ?kilometers ) BIND ( ?kilometers * 0.62137 AS ?miles ) } ORDER BY DESC ( ?kilometers ) LIMIT 100


question: Find multipolygon relations that do not form valid, closed areas.

sparql: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> PREFIX osm: <https://www.openstreetmap.org/> PREFIX osm2rdf: <https://osm2rdf.cs.uni-freiburg.de/rdf#> SELECT * WHERE { ?multipolygon rdf:type osm:relation . ?multipolygon osmkey:type "multipolygon" . MINUS { ?multipolygon osm2rdf:area [] . } }


question: Find the smallest mapped reservoirs (tagged landuse=reservoir) by area within Portugal.

sparql: PREFIX osmrel: <https://www.openstreetmap.org/relation/> PREFIX ogc: <http://www.opengis.net/rdf#> PREFIX osm2rdf: <https://osm2rdf.cs.uni-freiburg.de/rdf#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT ?osm_id ?area WHERE { osmrel:295480 ogc:sfContains ?osm_id . ?osm_id osmkey:landuse "reservoir" . ?osm_id osm2rdf:area ?area . } ORDER BY ASC ( ?area ) LIMIT 100


question: Rank mapped roundabouts or circular junctions by how non-circular they are, using a compactness test.

sparql: PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX osm2rdf: <https://osm2rdf.cs.uni-freiburg.de/rdf#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT * WHERE { VALUES ?junction_types { "circular" "roundabout" } ?roundabout osmkey:junction ?junction_types . ?roundabout osm2rdf:area ?area . ?roundabout osm2rdf:length ?perimeter . ?roundabout geo:hasGeometry / geo:asWKT ?geometry . BIND ( 4 * 3.14159 * ?area / ?perimeter / ?perimeter AS ?compactness ) OPTIONAL { ?roundabout osmkey:name ?name . } } ORDER BY ASC ( ?compactness ) LIMIT 100


question: Identify locations where consecutive highway segments within historic route relations do not connect.

sparql: PREFIX osmrel: <https://www.openstreetmap.org/relation/> PREFIX ogc: <http://www.opengis.net/rdf#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT DISTINCT ?route ?pos ?highway ?next_highway WHERE { { SELECT ?route ( MAX ( ?pos ) AS ?last_pos ) WHERE { ?route osmkey:route "historic" . ?route osmrel:member [ osmrel:member_id ?last_highway ; osmrel:member_pos ?pos ] . ?last_highway osmkey:highway [] . } GROUP BY ?route } ?route osmkey:route "historic" . ?route osmrel:member [ osmrel:member_id ?highway ; osmrel:member_pos ?pos ] . ?highway osmkey:highway [] . MINUS { ?route osmkey:route "historic" . ?route osmrel:member [ osmrel:member_id ?highway ; osmrel:member_pos ?last_pos ] . } ?route osmrel:member [ osmrel:member_id ?next_highway ; osmrel:member_pos ?next_pos ] . FILTER ( ?next_pos = ?pos + 1 ) MINUS { ?route osmkey:route "historic" . ?route osmrel:member / osmrel:member_id ?next_highway . ?highway ogc:sfTouches ?next_highway . } } ORDER BY ?route ?pos


question: Find road route relations that contain two distinct highway segments which overlap each other.

sparql: PREFIX osmrel: <https://www.openstreetmap.org/relation/> PREFIX ogc: <http://www.opengis.net/rdf#> PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT * WHERE { ?route osmkey:route "road" . ?route osmkey:network ?network . ?route osmkey:ref ?ref . ?route osmrel:member / osmrel:member_id ?highway1 . ?highway1 osmkey:highway [] . ?route osmrel:member / osmrel:member_id ?highway2 . ?highway2 osmkey:highway [] . ?highway1 ogc:sfOverlaps ?highway2 . ?highway1 geo:hasGeometry / geo:asWKT ?geometry . } ORDER BY ?network ?ref


question: Find buildings marked as demolished in OpenStreetMap that likely correspond to historical buildings mapped in OpenHistoricalMap (based on proximity and existence of an end date in OHM).

sparql: PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> PREFIX osm2rdfkey: <https://osm2rdf.cs.uni-freiburg.de/rdf/key#> SELECT ?osm_building ?ohm_building ?end_date ?ohm_geometry WHERE { ?osm_building osmkey:demolished:building [] . ?osm_building geo:hasCentroid / geo:asWKT ?osm_centroid . ?osm_centroid <max-distance-in-meters:10> ?ohm_centroid . SERVICE <https://qlever.cs.uni-freiburg.de/api/ohm-planet> { ?ohm_building osmkey:building [] . ?ohm_building geo:hasCentroid / geo:asWKT ?ohm_centroid . ?ohm_building geo:hasGeometry / geo:asWKT ?ohm_geometry . ?ohm_building osm2rdfkey:end_date ?end_date . } } ORDER BY ?end_date


question: Find OpenStreetMap nodes linked to a Wikidata item where the Wikidata item lacks a reciprocal link back to the OSM node.

sparql: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX osm: <https://www.openstreetmap.org/> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> PREFIX osm2rdfkey: <https://osm2rdf.cs.uni-freiburg.de/rdf/key#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?node ?name ?qid WHERE { ?node rdf:type osm:node . ?node osm2rdfkey:wikidata ?qid . OPTIONAL { ?node osmkey:name ?name . } BIND ( STRAFTER ( STR ( ?node ) , "/node/" ) AS ?osmid ) FILTER NOT EXISTS { SERVICE <https://qlever.cs.uni-freiburg.de/api/wikidata> { ?qid rdf:type wikibase:Item . ?qid wdt:P11693 ?node . } } }


question: Find OpenStreetMap ways linked to a unique Wikidata item where the Wikidata item lacks a reciprocal link back to the OSM way.

sparql: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX osm: <https://www.openstreetmap.org/> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> PREFIX osm2rdfkey: <https://osm2rdf.cs.uni-freiburg.de/rdf/key#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?way ?name ?qid WHERE { { SELECT ( SAMPLE ( ?osm ) AS ?way ) ?qid ( COUNT ( * ) AS ?count ) WHERE { ?osm rdf:type osm:way . ?osm osm2rdfkey:wikidata ?qid . } GROUP BY ?qid HAVING ( ?count = 1 ) } OPTIONAL { ?way osmkey:name ?name . } FILTER NOT EXISTS { SERVICE <https://qlever.cs.uni-freiburg.de/api/wikidata> { ?qid rdf:type wikibase:Item . ?qid wdt:P10689 ?osm . } } }


question: Find Wikidata items that link to an OpenStreetMap way, but the OSM way does not link back to the Wikidata item.

sparql: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX osm: <https://www.openstreetmap.org/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX osm2rdfkey: <https://osm2rdf.cs.uni-freiburg.de/rdf/key#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?qid ?label ?way WHERE { ?qid wdt:P10689 ?osm . OPTIONAL { ?qid rdfs:label ?label . FILTER ( LANG ( ?label ) = "en" ) } BIND ( IRI ( CONCAT ( "https://www.openstreetmap.org/way/" , ?osm ) ) AS ?way ) FILTER NOT EXISTS { SERVICE <https://qlever.cs.uni-freiburg.de/api/osm-planet> { ?way rdf:type osm:way . ?way osm2rdfkey:wikidata ?qid . } } }


question: Find the most frequently used OpenStreetMap keys on elements within Detroit.

sparql: PREFIX osmrel: <https://www.openstreetmap.org/relation/> PREFIX ogc: <http://www.opengis.net/rdf#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT ?p ?count ?percent WHERE { { SELECT ?p ( COUNT ( ?p ) AS ?count ) WHERE { ?s ?p ?o . osmrel:134591 ogc:sfContains ?s . } GROUP BY ?p } FILTER ( STRSTARTS ( STR ( ?p ) , osmkey: ) ) BIND ( 100 * ?count / SUM ( ?count ) AS ?percent ) } ORDER BY DESC ( ?count )


question: Rank OpenStreetMap keys used within Detroit by frequency of use, total length of associated ways, and total area of associated features.

sparql: PREFIX osmrel: <https://www.openstreetmap.org/relation/> PREFIX ogc: <http://www.opengis.net/rdf#> PREFIX osm2rdf: <https://osm2rdf.cs.uni-freiburg.de/rdf#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT ?p ?count ?count_percent ?length ?length_percent ?area ?area_percent WHERE { { SELECT ?p ( COUNT ( ?p ) AS ?count ) ( SUM ( ?l0 ) AS ?length ) ( SUM ( ?a0 ) AS ?area ) WHERE { ?s ?p ?o . osmrel:134591 ogc:sfContains ?s . OPTIONAL { ?s osm2rdf:length ?l . } BIND ( COALESCE ( ?l , 0 ) AS ?l0 ) OPTIONAL { ?s osm2rdf:area ?a . } BIND ( COALESCE ( ?a , 0 ) AS ?a0 ) } GROUP BY ?p } FILTER ( STRSTARTS ( STR ( ?p ) , osmkey: ) ) BIND ( 100 * ?count / SUM ( ?count ) AS ?count_percent ) BIND ( 100 * ?length / SUM ( ?length ) AS ?length_percent ) BIND ( 100 * ?area / SUM ( ?area ) AS ?area_percent ) } ORDER BY DESC ( ?count )


question: Rank the different values used for the 'highway' tag on ways within Detroit based on the total length of ways for each value.

sparql: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX osm: <https://www.openstreetmap.org/> PREFIX ogc: <http://www.opengis.net/rdf#> PREFIX osm2rdf: <https://osm2rdf.cs.uni-freiburg.de/rdf#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> PREFIX osmrel: <https://www.openstreetmap.org/relation/> SELECT ?o ?count ?count_percent ?length ?length_percent ?area ?area_percent WHERE { { SELECT ?o ( COUNT ( ?o ) AS ?count ) ( SUM ( ?l0 ) AS ?length ) ( SUM ( ?a0 ) AS ?area ) WHERE { ?s osmkey:highway ?o . ?s rdf:type osm:way . osmrel:134591 ogc:sfContains ?s . OPTIONAL { ?s osm2rdf:length ?l . } BIND ( COALESCE ( ?l , 0 ) AS ?l0 ) OPTIONAL { ?s osm2rdf:area ?a . } BIND ( COALESCE ( ?a , 0 ) AS ?a0 ) } GROUP BY ?o } BIND ( 100 * ?count / SUM ( ?count ) AS ?count_percent ) BIND ( 100 * ?length / SUM ( ?length ) AS ?length_percent ) BIND ( 100 * ?area / SUM ( ?area ) AS ?area_percent ) } ORDER BY DESC ( ?length )


question: Rank OpenStreetMap keys used within Detroit by the number of distinct users who last modified an element tagged with that key.

sparql: PREFIX osmrel: <https://www.openstreetmap.org/relation/> PREFIX ogc: <http://www.opengis.net/rdf#> PREFIX osmmeta: <https://www.openstreetmap.org/meta/> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT ?p ?count ?percent WHERE { { SELECT ?p ( COUNT ( DISTINCT ?user ) AS ?count ) WHERE { ?s ?p ?o . ?s osmmeta:user ?user . osmrel:134591 ogc:sfContains ?s . } GROUP BY ?p } FILTER ( STRSTARTS ( STR ( ?p ) , osmkey: ) ) BIND ( 100 * ?count / SUM ( ?count ) AS ?percent ) } ORDER BY DESC ( ?count )


question: Find the top 10 OpenStreetMap elements with the most tags.

sparql: PREFIX osm2rdf: <https://osm2rdf.cs.uni-freiburg.de/rdf#> SELECT * WHERE { ?element osm2rdf:facts ?facts . } ORDER BY DESC ( ?facts ) LIMIT 10


question: Find the 100 most common cuisine types tagged globally, considering multiple values per element.

sparql: PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT ( SAMPLE ( ?value ) AS ?cuisine ) ( COUNT ( * ) AS ?count ) WHERE { ?osm osmkey:cuisine ?list . BIND ( REPLACE ( ?list , ".*?([^;]+).*" , "$1" ) AS ?value ) } GROUP BY ?value ORDER BY DESC ( ?count ) LIMIT 100


question: What other tags are commonly found on features tagged as mimicking a chimney?

sparql: PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT ?key ?value ?count ( 100 * ?count / ?count_all AS ?percent ) WHERE { { { SELECT ?key ?value ( COUNT ( ?key ) AS ?count ) WHERE { ?element osmkey:mimics "chimney" . ?element ?key ?value . } GROUP BY ?key ?value } { SELECT ( COUNT ( DISTINCT ?element ) AS ?count_all ) WHERE { ?element osmkey:mimics "chimney" . ?element ?key ?value . } } } UNION { { SELECT ?key ( COUNT ( ?key ) AS ?count ) WHERE { ?element osmkey:mimics "chimney" . ?element ?key ?value . } GROUP BY ?key } { SELECT ( COUNT ( DISTINCT ?element ) AS ?count_all ) WHERE { ?element osmkey:mimics "chimney" . ?element ?key ?value . } } } FILTER ( STRSTARTS ( STR ( ?key ) , "https://www.openstreetmap.org/wiki/" ) ) } ORDER BY DESC ( ?count )


question: What other tags are commonly found on nodes within Portugal that are tagged as mimicking a chimney?

sparql: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX osm: <https://www.openstreetmap.org/> PREFIX ogc: <http://www.opengis.net/rdf#> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> PREFIX osmrel: <https://www.openstreetmap.org/relation/> SELECT ?key ?value ?count ( 100 * ?count / ?count_all AS ?percent ) WHERE { { { SELECT ?key ?value ( COUNT ( ?key ) AS ?count ) WHERE { ?element osmkey:mimics "chimney" . ?element rdf:type osm:node . osmrel:295480 ogc:sfIntersects ?element . ?element ?key ?value . } GROUP BY ?key ?value } { SELECT ( COUNT ( DISTINCT ?element ) AS ?count_all ) WHERE { ?element osmkey:mimics "chimney" . ?element rdf:type osm:node . osmrel:295480 ogc:sfIntersects ?element . ?element ?key ?value . } } } UNION { { SELECT ?key ( COUNT ( ?key ) AS ?count ) WHERE { ?element osmkey:mimics "chimney" . ?element rdf:type osm:node . osmrel:295480 ogc:sfIntersects ?element . ?element ?key ?value . } GROUP BY ?key } { SELECT ( COUNT ( DISTINCT ?element ) AS ?count_all ) WHERE { ?element osmkey:mimics "chimney" . ?element rdf:type osm:node . osmrel:295480 ogc:sfIntersects ?element . ?element ?key ?value . } } } FILTER ( STRSTARTS ( STR ( ?key ) , "https://www.openstreetmap.org/wiki/" ) ) } ORDER BY DESC ( ?count )


question: List the top 20 users who have most recently modified elements tagged as windmills, showing their count and the time range of these modifications.

sparql: PREFIX osmmeta: <https://www.openstreetmap.org/meta/> PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:> SELECT ?user ( COUNT ( * ) as ?count ) ( MIN ( ?timestamp ) as ?min_timestamp ) ( MAX ( ?timestamp ) as ?max_timestamp ) WHERE { ?osm osmkey:man_made "windmill" . ?osm osmmeta:user ?user . ?osm osmmeta:timestamp ?timestamp . } GROUP BY ?user ORDER BY DESC ( ?count ) LIMIT 20