Weather Observation Station 15

Sort by

recency

|

2090 Discussions

|

  • + 0 comments

    We can also use SubQuery - SELECT ROUND(LONG_W,4)FROM STATION WHERE LAT_N =(SELECT MAX(LAT_N) FROM STATION WHERE LAT_N < 137.2345)

  • + 0 comments

    SELECT ROUND(LONG_W,4) FROM STATION WHERE LAT_N<137.2345 ORDER BY LAT_N DESC LIMIT 1

  • + 0 comments

    fetch first is not supported for oracle users. try this:

    SELECT ROUND(LONG_W, 4) FROM ( SELECT LONG_W FROM STATION WHERE LAT_N < 137.2345 ORDER BY LAT_N DESC ) WHERE ROWNUM = 1;

  • + 0 comments

    without using sub query-select round(LONG_W,4) from station where LAT_N < 137.2345 order by LAT_N desc limit 1

  • + 0 comments

    select cast(CONCAT(SUBSTRING(cast(round(max(long_w),4) as varchar), 1 ,charindex('.',cast(round(max(long_w),4) as varchar))-1), SUBSTRING(cast(round(max(long_w),4) as varchar), charindex('.',cast(round(max(long_w),4) as varchar)),5)) as decimal(10,4)) from station where LAT_N <137.2345 and LAT_N in (select max(lat_n) from station where lat_n < 137.2345)