Query the greatest value of the Northern Latitudes (LAT_N) from STATION that is less than . Truncate your answer to decimal places.
Input Format
The STATION table is described as follows:
where LAT_N is the northern latitude and LONG_W is the western longitude.
MySql:
Sol 1:
select round(lat_n,4) from station where round(lat_n,4) < 137.2345 order by lat_n desc limit 1
Sol 2:
SELECT ROUND(MAX(Lat_N), 4) FROM Station WHERE Lat_N < 137.2345;
Sol 3:
SELECT ROUND(LAT_N,4) FROM STATION WHERE LAT_N IN (SELECT MAX(LAT_N) FROM STATION WHERE LAT_N<137.2345);
Post a Comment