MulaiMulai sekarang secara gratis

Inner Joins (II)

Here, you'll continue to practice your INNER JOIN skills. We'll use the album table as last time, but will join it to a new table - artist - which consists of two columns: artist_id and name.

Latihan ini adalah bagian dari kursus

Introduction to SQL Server

Lihat Kursus

Petunjuk latihan

  • Select the album_id and title columns from album (the main source table name).
  • Select the name column from artist and alias it as artist.
  • Identify a common column between the album and artist tables and perform an inner join.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

-- Select album_id and title from album, and name from artist
SELECT 
  ___,
  ___,
  ___ AS artist
  -- Enter the main source table name
FROM ___
  -- Perform the inner join
INNER JOIN ___ on ___.___ = ___.artist_id;
Edit dan Jalankan Kode