0
0
SQLquery~10 mins

ROUND, CEIL, FLOOR in SQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to round the value 3.7 to the nearest integer.

SQL
SELECT [1](3.7);
Drag options to blanks, or click blank then click option'
ATRUNC
BCEIL
CFLOOR
DROUND
Attempts:
3 left
💡 Hint
Common Mistakes
Using CEIL or FLOOR instead of ROUND.
Confusing ROUND with TRUNC.
2fill in blank
medium

Complete the code to get the smallest integer greater than or equal to 5.3.

SQL
SELECT [1](5.3);
Drag options to blanks, or click blank then click option'
AROUND
BFLOOR
CCEIL
DABS
Attempts:
3 left
💡 Hint
Common Mistakes
Using FLOOR which rounds down.
Using ROUND which rounds to nearest.
3fill in blank
hard

Fix the error in the code to get the largest integer less than or equal to 7.9.

SQL
SELECT [1](7.9);
Drag options to blanks, or click blank then click option'
AFLOOR
BROUND
CCEIL
DSQRT
Attempts:
3 left
💡 Hint
Common Mistakes
Using CEIL which rounds up.
Using ROUND which rounds to nearest.
4fill in blank
hard

Fill both blanks to round 4.567 to 2 decimal places and then get the ceiling of the result.

SQL
SELECT [1]([2](4.567, 2));
Drag options to blanks, or click blank then click option'
ACEIL
BROUND
CFLOOR
DABS
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping CEIL and ROUND order.
Using FLOOR instead of CEIL.
5fill in blank
hard

Fill all three blanks to get the floor of 9.99, then round it, and finally get the ceiling of the rounded value.

SQL
SELECT [1]([2]([3](9.99)));
Drag options to blanks, or click blank then click option'
ACEIL
BROUND
CFLOOR
DABS
Attempts:
3 left
💡 Hint
Common Mistakes
Changing the order of functions.
Using ABS which is unrelated.