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

Is this a premium song?

In the last exercise, you used the Snowflake UI to explore the database and tables that you'll be working with. Throughout the course, we'll switch back and forth between the Snowflake UI and the query editor you see here. Now, it's time to get hands-on with CASE statements. First, you'll use the track table to categorize the unit price of each song. Let's get to it!

Bu egzersiz

Data Manipulation in Snowflake

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

Egzersiz talimatları

  • Begin a CASE statement to classify the price of a song.
  • If the unit_price of a song is 0.99, label it as a 'Standard Song'.
  • If instead a song's unit_price is 1.99, this should be labeled as a 'Premium Song'.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

SELECT
	name,
    composer,
    -- Begin a CASE statement
    ___
        -- A song priced at 0.99 should be a 'Standard Song'
    	WHEN ___ = ___ THEN '___'
        -- Songs costing 1.99 should be denoted as 'Premium Song'
        ___ unit_price = 1.99 ___ '___'
    END AS song_description
FROM store.track;
Kodu Düzenle ve Çalıştır