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
  5. Discussions

Weather Observation Station 18

Problem
Submissions
Leaderboard
Discussions

Sort 1615 Discussions, By:

recency

Please Login in order to post a comment

  • s_fedoriv
    5 hours ago+ 0 comments

    MySQL

    SELECT 
    ROUND((MAX(Lat_N)-MIN(Lat_N))+(MAX(Long_W)-MIN(Long_W)), 4) 
    From Station;
    
    0|
    Permalink
  • prabhakarkumar51
    1 day ago+ 0 comments
    SELECT 
    ROUND(ABS(MIN(LAT_N)-MAX(LAT_N))+ABS(MIN(LONG_W)-MAX(LONG_W)),4) 
    FROM STATION;
    
    0|
    Permalink
  • lamuhika
    1 day ago+ 1 comment

    What is wrong with this code? I tried to use pythagorean theorem.

    select round(sqrt(power(max(LAT_N)-min(LAT_N), 2) + power(max(LONG_W)-min(LONG_W), 2)), 4) from station;

    0|
    Permalink
  • pendesaurabh
    2 days ago+ 0 comments
    SELECT ROUND((abs(MIN(LAT_N) - MAX(LAT_N)) + abs(MIN(LONG_W) - MAX(LONG_W))),4) 
        FROM STATION;
    
    0|
    Permalink
  • bonhomie
    2 days ago+ 0 comments

    Applying the equation for Manhattan Distance: |x^1 - x^2| + |y^1 - y^2|

    SELECT ROUND((ABS(MIN(LAT_N) - MAX(LAT_N)) + ABS(MIN(LONG_W) - MAX(LONG_W))), 4)
    FROM STATION;
    
    0|
    Permalink
Load more conversations

Need Help?


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