Weather Observation Station 19 | HackRank

Weather Observation Station 19 | HackRank

Welcome People, Bots & Algo’s of THE INTERWEBS. This is the Thursday Edition of The Analyst.

?

Weather Observation Station 19

?

SELECT CAST(SQRT(SQUARE(MIN(LAT_N)-MAX(LAT_N)) + SQUARE(MIN(LONG_W)-MAX(LONG_W))) AS DECIMAL(9,4))

FROM STATION

?

Cast :These functions convert an expression of one data type to another.

Decimal

Because you are casting as Decimal? that’s why it reads as decimal.

The? DECIMAL(9,4) 9 means their can be up to 9 digits before the period.

The ,4 means their can be up to 4 digits after the period.

Square : is the variable name

SQRT : is the function to square the whole sum



要查看或添加评论,请登录

Shrikesh M.的更多文章

社区洞察

其他会员也浏览了