Question: SQL - Questions Answer the following questions using the mobile phone company database. Submit only the SQL statements, NOT the query result!! customer calls mobile
SQL - Questions
Answer the following questions using the mobile phone company database. Submit only the SQL statements, NOT the query result!!
| customer | calls | mobile | staff | tower | connection |
| customerID | callID | mobileID | staffID | towerID | connectID |
| surname | mobileID | phoneNumber | surname | location | towerID |
| givenName | phoneNumber | brandName | givenName | bandwidth | callID |
| dob | callDate | joinDate | sex | maxConn |
|
| sex | callDuration | cancelDate | joinDate |
|
|
| phoneHome |
| planName | resignDate |
|
|
| phoneWork |
| phoneColour | address |
| plan |
| phoneFax |
| customerID | suburb |
| planName |
| address |
| staffID | postcode |
| connectFee |
| suburb |
|
| phone |
| peakFee |
| state |
|
| supervisorID |
| offPeakFee |
| postcode |
|
| commission |
| weekendFee |
|
|
|
| ratePerHour |
|
|
i) What is the average age of all customers?
j) What is the total annual salary being paid out to current active staff? (Round the result to 2 decimal places.) (Assume 40 hours in a week and 52 weeks in a year.)
k) Show a list of brand names and a count of the unique customers for each brand.
l) For calls made in 1999, display how many calls were made on each day of the week.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
