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!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Danielle Torres
Danielle Torres

Written by Danielle Torres

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

No responses yet

Write a response