Akshit6828 / MySQL-Assignment1

This repo contains a small practice problem for MySQL Task.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Task Instructions

Provide SQL statements and the query output for the following:

  1. List all the customers who live in any part of CAULFIELD. List only the Customer ID, full name, date of birth and suburb (5 marks)
  2. List all of the active staff. Show their Staff ID, full name and weekly salary assuming that they work a 38 hour week (3 marks)
  3. Which plan has the most expensive contract to break? (5 marks)
  4. Which brands of mobile phone does this company sell? List only the unique brand names ( 3 marks)
  5. Which customer is not able to purchase a phone? Use a query to explain why. Hint: Review the customer data (3 marks)
  6. How many of each phone plan have been sold? (5 marks)
  7. What is the average age of an Apple phone user? (8 marks)
  8. What are the first and most recent mobile phone purchases? (3 marks)
  9. i. For calls made in 2018 how many calls were made on the weekend? (5 marks) ii. For calls made in 2018 how many calls were made on each day of the weekend? (3 marks)
  10. Provide a listing of the utilization of each tower and its location i.e. how busy each tower is based on the number of connections. Put the busiest tower at the top of the list (3 marks)
  11. Did any users on the ‘Large’ plan exceed their monthly allowance during August 2018? ( marks)
  12. The company is upgrading all their 3G towers from to 5G. i. How many towers will be upgraded? (1 mark) ii. what SQL will be needed to update the database to reflect the upgrades? (2 marks)
  13. i. List the full name, join date, resigned date of each staff member and name, join date and resigned date of their manager (3 marks) ii. What do you observe with the data? ( 2 marks)
  14. How much revenue was generated in 2017 by each plan from call charges. Format the output as currency i.e. $123.45 (8 marks)
  15. List the customers who made phone calls longer than 200 minutes (5 marks)
  16. Which customers have more than one mobile phone? List the customer name, suburb and state. Order by the customer name (8 marks)
  17. Are there any mobile phone plans that are currently unused? This can be obtained a number of ways. Demonstrate this by using the following two query types i. Nested subquery (3 marks) ii. Outer join (3 marks)
  18. List the oldest and the youngest customers in the postcodes 3000 and 3102. Show the customer full name age and suburb details (3 marks)
  19. i. Create a view that shows the popularity of each phone colour (1 mark) ii. Use this view in a query to determine the least popular phone colour (2 marks)
  20. The billing team is getting returned mail because of bad customer addresses. This is causing a loss in revenue. i. Review the customer data and find at least 3 issues (3 marks) ii. Provide the SQL statements to correct the data problems (2 marks)

Referencing

It is essential that you use appropriate APA style for citing and referencing research. Please see more information on referencing here http://library.laureate.net.au/research_skills/referencing

About

This repo contains a small practice problem for MySQL Task.