From e7d6979a371917b69f705f23d7e4a04effc6136b Mon Sep 17 00:00:00 2001 From: Badal Singh Naik <131689117+bsn-09@users.noreply.github.com> Date: Thu, 27 Apr 2023 20:12:58 +0530 Subject: [PATCH] Line No. 153 and 166 added alias Added an alias at the closing of brackets. --- src/hackerrank-aggregation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hackerrank-aggregation.md b/src/hackerrank-aggregation.md index 4bf8a4a..cd031c9 100644 --- a/src/hackerrank-aggregation.md +++ b/src/hackerrank-aggregation.md @@ -150,7 +150,7 @@ d happens to equal the maximum value in Western Longitude (LONG_W in STATION). Query the [Manhattan Distance](https://xlinux.nist.gov/dads/HTML/manhattanDistance.html) between points P1 and P2 and round it to a scale of 4 decimal places. SELECT ROUND(ABS(a - c) + ABS(b - d), 4) FROM ( - SELECT MIN(lat_n) AS a, MIN(long_w) AS b, MAX(lat_n) AS c, MAX(long_w) AS d FROM station); + SELECT MIN(lat_n) AS a, MIN(long_w) AS b, MAX(lat_n) AS c, MAX(long_w) AS d FROM station) AS output_table; @@ -163,5 +163,5 @@ Consider P1(a,c) and P2(b,d) to be two points on a 2D plane. Query the [Euclidean Distance](https://en.wikipedia.org/wiki/Euclidean_distance) between points P1 and P2 and format your answer to display 4 decimal digits. SELECT ROUND (SQRT((a - b) * (a - b) + (c - d) * (c - d)), 4) FROM ( - SELECT MIN(lat_n) AS a, MAX(lat_n) AS b, MIN(long_w) AS c, MAX(long_w) AS d FROM station); + SELECT MIN(lat_n) AS a, MAX(lat_n) AS b, MIN(long_w) AS c, MAX(long_w) AS d FROM station) AS output_table;