Hi! Could we please enable some services and cookies to improve your experience and our website?
Privacy & Cookie Policy.Write a SQL query to calculate the distance between London and Paris. The calculation must be done using geospatial functions. The result must be in kilometers and rounded to an integer. Output one column:
Use PostGIS (PostgreSQL) syntax to write your answer. Descriptions of tables are provided in the right pane.
Write your request in the field below and click the "Check it!" button.The Countries database is a PostGIS sample database designed for geographic and geospatial data analysis. It includes spatial information about countries, capitals, and New York City data such as census blocks, homicides, neighborhoods, streets, and subway stations, suitable for GIS applications and spatial queries.
| id | name | border |
|---|---|---|
| 1 | France | MultiPolygon(...) [SRID=4326] |
| id | name | country_id | location |
|---|---|---|---|
| 1 | Paris | 1 | Point(...) [SRID=4326] |
| gid | blkid | popn_total | popn_white | popn_black | popn_nativ | popn_asian | popn_other | boroname | geom |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 360050001001000 | 1000 | 500 | 200 | 50 | 150 | 100 | Manhattan | MultiPolygon(...) [SRID=4326] |
| gid | incident_d | boroname | num_victim | primary_mo | id | weapon | light_dark | year | geom |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 2003-01-01 | Manhattan | 1 | Unknown | 1 | Firearm | D | 2003 | Point(...) [SRID=4326] |
| gid | boroname | name | geom |
|---|---|---|---|
| 1 | Manhattan | Financial District | MultiPolygon(...) [SRID=4326] |
| gid | id | name | oneway | type | geom |
|---|---|---|---|---|---|
| 1 | 1 | Broadway | NO | avenue | LineString(...) [SRID=4326] |
| gid | objectid | id | name | alt_name | cross_st | long_name | label | borough | nghbhd | routes | transfers | color | express | closed | geom |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | Times Square | Times Sq | 7th Ave | Times Square-42nd Street | Times Sq | Manhattan | Midtown | 1,2,3,7,A,C,E,N,Q,R,S,W | 42nd St | Red | Yes | No | Point(...) [SRID=4326] |