Anusha Murali

Logo

Please see github.com/anusha-murali for all of my repositories.

View GitHub Profile

32. Weather Observation Station 17


Query the Western Longitude (LONG_W)where the smallest Northern Latitude (LAT_N) in STATION is greater than 38.7780. Round your answer to 4 decimal places.

The STATION table is described as follows:

16

where LAT_N is the northern latitude and LONG_W is the western longitude.

solution_image5

The problem is asking us to first select those rows where LAT_N > 38.7780 and then select the LONG_W which corresponds to the smallest LAT_N from those rows.

SELECT ROUND(LONG_W, 4)
FROM (
       SELECT *
       FROM STATION
       WHERE LAT_N > 38.7780 ORDER BY LAT_N
      )
WHERE ROWNUM <= 1;

Back to problems


anusha-murali.github.io