BaşlayınÜcretsiz Başlayın

Rounding numbers

All the prices of songs end with .99. There are some countries that have phased out pennies, like Canada. In order to comply with this, you have been asked to convert UnitPrice in the Track table to the nearest whole number (e.g., $1.99 to $2).

In the video, we covered ROUND() and TRUNC(), which do you need to accomplish this task?

Bu egzersiz

Introduction to Oracle SQL

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Select the TrackId and UnitPrice column from Track.
  • Use a function on UnitPrice to round up to the nearest whole number.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

-- Select TrackId and rounded unit price
SELECT ___, ___
FROM ___
Kodu Düzenle ve Çalıştır