We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
This question is poorly written. Note the possible ways to interpret:
"Write a query to print the sum of LAT_N and LONG_W up to 2 decimal places separated by space."
This could read as "Print the sum of LAT_N + the sum of LONG_W", or "Print the sum of each column". Also, the problem mentions nothing of ROUNDING the decimals. As a result, TRUNCATE doesn't work, which based on the problem should be the (more) correct function.
So for anyone confused about what is being requested, print the sum of each column, ROUNDED to two decimals.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Weather Observation Station 2
You are viewing a single comment's thread. Return to all comments →
This question is poorly written. Note the possible ways to interpret:
"Write a query to print the sum of LAT_N and LONG_W up to 2 decimal places separated by space."
This could read as "Print the sum of LAT_N + the sum of LONG_W", or "Print the sum of each column". Also, the problem mentions nothing of ROUNDING the decimals. As a result, TRUNCATE doesn't work, which based on the problem should be the (more) correct function.
So for anyone confused about what is being requested, print the sum of each column, ROUNDED to two decimals.