Consider the following three relations:
TRAVEL_AGENT (name, age, salary)
CUSTOMER (name, departure_city, destination, journey_class)
TRANSACTION (number, cust_name, travel_agent_name, amount_paid)
Write SQL statements to answer the following questions.
a. Compute the number of different customers who have a transaction.
b. Display the name of the oldest travel agent.
c. List the total number of transactions for each travel agent. Consider only those transactions where the amount paid exceeds 1 000.
d. Display the names and ages of the travel agents who have arranged journeys for customer “John Smith”, in descending order of age (use a subquery).
e. Display the names and ages of travel agents who have arranged journeys for customer “John Smith”, in descending order of age (do not use a subquery).
f. Display the age of travel agents who have arranged journeys for customer “John Smith” to “Ottawa” (use a subquery).
g. Display the age of travel agents who have arranged journeys for customer “John Smith” to “Ottawa” (do not use a subquery).
h. Display the names and salaries of all travel agents who did not arrange journeys for customer “John Smith”, in ascending order of salary.
i. Display the names of travel agents who have five or more transactions.
j. Display the names of all travel agents who have arranged at least ten journeys to “Ottawa”.