I got a question about Oracle SQL using the subquery.
With a table as shown below
the question is.
"Write a query that will display the customer(s) that referred maximum number of customers."
You can see a customer with max number of reference when you execute this code,
SELECT cust_referred, COUNT(*)
FROM customer
WHERE cust_referred IS NOT NULL
GROUP BY cust_referred;
I think I need to match cust_num(previous table) to cust_referred with the maximum number of reference, which is 1003 with 3.