HackerRank SQL

Weather Observation Station 14

Problem:

Query the greatest value of the Northern Latitudes (LAT_N) from STATION that is less than 137.2345. Truncate your answer to 4 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.

Logic: Use ROUND(,) for truncating

Solution:

SELECT ROUND(MAX(LAT_N),4) FROM STATION WHERE LAT_N < 137.2345;

--

--

--

My homepage to record my thought processes for solving SQL and Algorithm questions

Recommended from Medium

Project Deployment in SSIS

How to Debug Common API Errors

Beautify your Linux Terminal: Ohmyzsh+wsl+Hyper.js!

What if I do this? *presses button*

Getting Started with OpenCV-Python

Streaming data out of a Corda node with Spring WebFlux

Using Public IDs in an API Without Killing Database Performance

A track athlete crouching at the starting line.

Journal 18 — How Long Should Powerups Last? Unity Practice

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Isabelle

Isabelle

In love with telling stories with data

More from Medium

SQL Server Indexes: Interview Questions

SQL Introduction 1

An internal hard drive

INTRODUCTION TO SQL

Window Functions in SQL