MulaiMulai sekarang secara gratis

Working with the modulo

Employees have different Titles. Some are Sales Support Agents and they are responsible for supporting clients with sales. Each Sales Support Agent gets assigned their own set of customers. The company has gone through a restructuring and now there is a new number of Sales Support Agents.

Your manager wants to know if she can equally divide customers amongst the new sales support team so that each agent has the same number of customers. In this exercise, you will answer this question using the MOD() and COUNT() functions.

Latihan ini adalah bagian dari kursus

Introduction to Oracle SQL

Lihat Kursus

Petunjuk latihan

  • Use a function to find the remainder between to values.
  • The first value should be the number of customers.
  • The second value should be the number of employees who are Sales Support Agents.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

-- Use a function to find the remainder
SELECT ___(___, ___) AS Modulo
-- Value to be divided
FROM (SELECT ___ AS numerator 
      FROM ___)
	-- Divisor
    CROSS JOIN (SELECT ___ AS denominator 
          FROM ___ 
          WHERE ___ = '___')
Edit dan Jalankan Kode