Mulai sekarangMulai gratis

Mengelompokkan bersama

Pada latihan terakhir ini, Anda akan menggabungkan GROUP BY dengan fungsi agregat seperti MIN yang telah Anda pelajari sebelumnya di bab ini.

Untuk menutup bab ini, kita akan kembali ke tabel eurovision dari bab pertama.

Latihan ini merupakan bagian dari kursus

Pengantar SQL Server

Lihat Kursus

Latihan interaktif langsung praktik

Cobalah latihan ini dengan melengkapi kode contoh ini.

-- Retrieve the minimum and maximum place, and point values
SELECT 
  -- the lower the value the higher the place, so MIN = the highest placing
  MIN(place) AS hi_place, 
  ___(place) AS lo_place, 
  -- Retrieve the minimum and maximum points values. This time MIN = the lowest points value
  ___(points) AS min_points, 
  MAX(points) AS max_points 
FROM 
  eurovision;
Edit dan Jalankan Kode