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.
Weather Observation Station 15
Weather Observation Station 15
Sort by
recency
|
2021 Discussions
|
Please Login in order to post a comment
THIS WORKS IN MY SQL
select round(max(LONG_W ),4) AS ROUNDED_LONGITUTE FROM STATION WHERE LAT_N = (SELECT MAX(LAT_N) FROM STATION WHERE LAT_N < 137.2345);
SELECT ROUND(LONG_W, 4) AS Western_Longitude FROM STATION WHERE LAT_N = (SELECT MAX(LAT_N) FROM STATION WHERE LAT_N < 137.2345);
so basically we order all the values of lat_n in descending order that are less than 137.2345 and then by writing limit 1 we specify that we need the maximum or the largest value of lat_n that is less than 137.2345. SELECT TRUNCATE(LAT_N,4) FROM STATION WHERE LAT_N < 137.2345 ORDER BY LAT_N DESC LIMIT 1;
SELECT CAST(MAX(LONG_W) as DECIMAL(10,4)) FROM STATION WHERE LAT_N = (SELECT MAX(LAT_N) FROM Station WHERE LAT_N < 137.2345)
SELECT ROUND(long_w,4) FROM Station WHERE lat_n = (SELECT MAX(lat_n) FROM Station WHERE lat_n < 137.2345);