To perform the following assignments refer to the tables in
To perform the following assignments, refer to the tables in the JustLee Books database.
Create a list of all customer numbers along with text indicating whether the customer has been referred by another customer. Display the text \"NOT REFERRED\" if the customer wasn\'t referred to JustLee Books by another customer or \"REFERRED\" if the customer was referred.
Solution
SELECT firstname, lastname, NVL2(referrred, \'REFERRED\', \'NOT REFERRED\')FROM customers;
