Assignment title: Information
List all details of orders made between July and December 2014, by males between 20 and 30 years old, for products that cost more than 100 dollars. 2. For all unpaid orders, show how many days the payment is overdue (based on the order date) and details of the customer that owes the money. Sort the list by days overdue and then by surname. 3. The computer shop wants to know how many orders have been placed by each sex (ie. How many orders were made by males and how many orders were made by females). 4. For each postcode, show the number of orders placed during 2014. 5. Show how many orders were placed in each month of 2014. 6. Create a view displaying the total number of items sold for each product. Include the product name in the view. Don’t forget to take the quantity field into consideration. 7. Using the view in the previous question, show details of the product with the highest number of sales. 8. Show products that have never been sold. 9. Display the name and price of the cheapest and most expensive item in the store. 10. Create a view that displays the total value of each order (ie. The total amount of money that each order was for). 11. Using the view in the previous question, show details of the biggest order ever. 12. Show all products that are part of another product. Show the name of both products (Hint: Self Join). 13. Write a query that displays how much each customer has spent with the store (taking into account the quantity field). Also include customers that have never bought anything. 14. Create your own query. It must include a nested query. Submit the following: • question your query is answering • the SQL query • The mark for this question will depend on the complexity of the query. • Higher marks will be given for queries that are more complex and/or innovative. • If you do not provide a description of what question the query is answering, you will get zero for this query.