IniziaInizia gratis

Rounding numbers

Sometimes, you only care about the whole dollar amount and want to ignore the decimal values of the cost. In this exercise, you will round the cost to the nearest dollar.

Questo esercizio fa parte del corso

Intermediate SQL Server

Visualizza il corso

Istruzioni dell'esercizio

Write a SQL query to round the values in the Cost column to the nearest whole number.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

-- Round Cost to the nearest dollar
SELECT Cost, 
       ___ AS RoundedCost
FROM Shipments
Modifica ed esegui il codice