Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A phone company has set up the following database in order to be able to send detailed bills to its customers: CUSTOMER(Phone#,FirstName, LastName, City), CALL(CallerPhone#,
A phone company has set up the following database in order to be able to send detailed bills to its customers:
CUSTOMER(Phone#,FirstName, LastName, City),
CALL(CallerPhone#, CalledPhone#, Date, Time, Duration, Cost),
The keys of the relations are underlined
Express queries in SQL.
- Print a detailed call log (CalledPhone#, Date, Time, Duration, cost) for John Stewart for the month of August 2021
- Print a detailed call log (CalledPhone#, Date, Time, Duration, cost) for all the customers for the month of August 2021
- Print the phone numbers John Stewart called between September 1st and September 15th, 2021
- Print the name of the customers who called at least one number John Stewart called between September 1st and September 15th, 2021
- Print the name of the customers living in the same city as John Stewart that John Smith has never called
- Print the names of the customers who made at least one phone call on September 1st, 2021
- Print the names of the customers who did not make any phone call since September 1st, 2021
- On which days, all the customers made at least one call?
- If we assume that customers call only people in their contact lists, print pairs of customers who have at least 1 common contact
- List for every customer, the number of calls per day since September 1st, 2021.
- If we assume that customers call only people in their contact lists, who has the largest contact list?
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