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

Comparing values

eSymphony has asked you to look into the differences between composer and artist name. More specifically, they want to know for which Queen tracks these differ. If they are the same a NULL value should appear, and if they differ the artist name should be displayed. This is obviously no challenge for you since you know all about null-related functions.

Bu egzersiz

Introduction to Oracle SQL

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

Egzersiz talimatları

  • Display NULL if the artist name and composer are the same and the artist name if they differ.
  • Filter on rows where the artist name is 'Queen'.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

-- Use the correct null-related function
SELECT t.Name, ar.Name, t.Composer, ___(___, ___)
FROM Track t INNER JOIN Album a 
	ON t.AlbumId = a.AlbumId
	INNER JOIN Artist ar
	ON a.ArtistId = ar.ArtistId
-- Filter on artist name Queen
WHERE ___ = '___'
ORDER BY 3
Kodu Düzenle ve Çalıştır