Weather Observation Station 20

Danielle Torres
Mar 29, 2021

Hello Everyone!

Today I will be reviewing how I solved the Hacker Rank Challenge, Weather Observation Level Medium, using SQL.

The Objective is to Query the median of the Northern Latitudes(Lat_N) from STATION and round the answer to 4 decimal Places.

Station Table

Fields — Type

(ID — Number,

CITY — Varchar2,

STATE — Varchar2,

LAT_N — Number,

LONG_W — Number)

I used the medium function, which finds the middle values in a list of numbers. Then I used the round function to round to the nearest decimal place.

This is what the final results will look like.

select round(median(lat_n),4)
from station;

This was another fun challenge and I can’t wait to solve it using other languages. Until next time!

--

--

Danielle Torres

Highly organized & motivated Software Engineer with an application analyst/data analyst background.