We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. SQL
  3. Aggregation
  4. Weather Observation Station 18

Weather Observation Station 18

Problem
Submissions
Leaderboard
Discussions
  1. Prepare
  2. SQL
  3. Aggregation
  4. Weather Observation Station 18
Exit Full Screen View
  • Problem
  • Submissions
  • Leaderboard
  • Discussions

Consider and to be two points on a 2D plane.

  • happens to equal the minimum value in Northern Latitude (LAT_N in STATION).
  • happens to equal the minimum value in Western Longitude (LONG_W in STATION).
  • happens to equal the maximum value in Northern Latitude (LAT_N in STATION).
  • happens to equal the maximum value in Western Longitude (LONG_W in STATION).

Query the Manhattan Distance between points and and round it to a scale of decimal places.

Input Format

The STATION table is described as follows:

where LAT_N is the northern latitude and LONG_W is the western longitude.

  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy