Skip to main contentSkip to solution

What will be the ouput of following query?

SELECT ROUND(3.144, 1);

Solution

✅ Correct Option: 3

ROUND(number, d) rounds the number to d decimal places. Here d = 1, so only one digit is kept after the decimal point.

The digit after the first decimal place is 4, which is less than 5, so the 1 stays as it is and the result is 3.1.


Option 1: 3.2 would need the next digit to be 5 or more, but it is 4.

Option 2: 3.14 is what ROUND(3.144, 2) gives, since that keeps two decimal places.

A negative second argument rounds digits to the left of the decimal point, e.g. ROUND(135, -1) gives 140.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question