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

Restricting groups

Earlier you created an overview of how many eSymphony customers live in each country. The output was a long list. Now, you want to restrict your results and only display countries with more than four customers. Since you grouped your output by country, you will now need to exclude values on a group-level rather than a row-level.

Bu egzersiz

Introduction to Oracle SQL

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

Egzersiz talimatları

  • Run the query. Note that it throws an error.
  • Adapt the query to show countries with more than four customers.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

-- Adapt the query below to show the correct results
SELECT Country, COUNT(*) AS Customers
FROM Customer
WHERE COUNT(*) > 4
GROUP BY Country
Kodu Düzenle ve Çalıştır