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

Weather Observation Station 15

Problem
Submissions
Leaderboard
Discussions

Sort 1362 Discussions, By:

recency

Please Login in order to post a comment

  • s_fedoriv
    5 hours ago+ 0 comments

    MySQL

    SELECT ROUND(Long_w, 4)
    FROM Station
    WHERE  Lat_n < 137.2345
    ORDER BY Lat_n DESC
    LIMIT 1;
    
    0|
    Permalink
  • saini_kamal12111
    7 hours ago+ 0 comments

    select round(long_w,4) from station where lat_n = (select max(lat_n) from station where lat_n < 137.2345

    0|
    Permalink
  • ashutsoh_akkole1
    15 hours ago+ 0 comments

    mySql:

    one way:

    select round(long_w,4) from station where lat_n = (select max(lat_n) from station where lat_n<137.2345)

    other easy way but little bit different logic

    0|
    Permalink
  • giridhar_alapati
    18 hours ago+ 0 comments

    select Round(LONG_W,4) from STATION where LAT_N<137.2345 order by LAT_N DESC LIMIT 1

    1|
    Permalink
  • mohammadmanan834
    1 day ago+ 0 comments

    WITH CTE AS ( SELECT LONG_W FROM STATION
    WHERE LAT_N < 137.2345)

    SELECT TOP 1 CAST(LONG_W AS NUMERIC (16,4)) FROM CTE WHERE LAT_N < 137.2345 ORDER BY LAT_N DESC;

    0|
    Permalink
Load more conversations

Need Help?


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