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 1860 Discussions, By:

recency

Please Login in order to post a comment

  • namnmfx22541
    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
  • raftaarrashedin1
    3 days ago+ 0 comments
    select abs(round((min(lat_n)-max(lat_n)) +(min(long_w)-max(long_w)),4)) from station;
    
    0|
    Permalink
  • arjunbindra2
    3 days ago+ 1 comment

    the expected output is 259.6859 but mine is coming out to be 259.68590000. That must be the reason for the error, I suppose. Although I have tried using Trim (trailing '0'), but does't work. Any suggestions?

    select Round(abs(max(lat_n)-min(lat_n))+abs(max(long_w)-min(long_w)),4) as distance from station;

    0|
    Permalink
  • omkarthorve_ot
    4 days ago+ 0 comments

    SELECT ABS(ROUND(((MIN(LAT_N)-MAX(LAT_N))+(MIN(LONG_W)-MAX(LONG_W))),4)) AS distance FROM STATION;

    0|
    Permalink
  • aishwarya_nair_1
    5 days ago+ 0 comments

    select round((max(lat_n)-min(lat_n))+ (max(long_w)-min(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