Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The database of a car rental firm has three tables: customer, car and rental. One customer can have many rentals, but one car rental is
The database of a car rental firm has three tables: customer, car and rental. One customer can have many rentals, but one car rental is associated with one and only one customer. One car can be rented many times but one rental is associated with one and only one car. Tables are created in the database carrental.
customerid is the primary key in the customer table. carid is the primary key in the car table. rentalid is the primary key in the rental table. customerid and carid are foreign keys in the rental table. TO DO IMPORTANT :Select the database carrental. Use SQL queries to answer questions of your own choice. For each question provide the question description, SQL code and the output table. The queries should contain at least one:
ORDER BY clause
WHERE clause
GROUP BY clause
HAVING clause
INNER JOIN clause
Subquery
Mathematical Expression calculated field NOTE: After each question provide your query description SQL query AND screenshot of the result table output table
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started