Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Given the following relations of an Online Game Ordering system and the database schema with sample data found in the Appendix on page 5 and
Given the following relations of an Online Game Ordering system and the database schema with sample data found in the Appendix on page 5 and 6: Platform (PlatformNo, PlatformDesc, DevCompany, LaunchDate, Portable) Game (GameNo, GameDesc, StockQuantity, Medium, PlatformNo) Client (ClientNo, UserName, UserPassword, CreditCardNo, Country) Purchase (GameNo, ClientNo, PurchaseDate) where the underlined attributes are the primary key attributes. Write a SINGLE SQL statement for each of the following questions: (a) Add the following record to the Purchase table. [2 marks] (b) Change the credit card number to AC-5678-123-BBB for the client with client number c0005. [3 marks] (c) Remove the purchase record with game number G0003 and client number C0004. [2 marks] (d) For each platform number, show the total number of copies of games in the stock. [3 marks] (e) Display the game number and game description for the games with platform number P0009. Sort the list by descending order of game description. [2 marks] (f) Display the game description, number of copies in the stock and platform description for the games with the number of game copies in the stock less than 50 . [3 marks] (g) Display the user name and the number of purchase for the clients who had purchased two or more times. [5 marks] (h) Display the purchase details (game description, user name and purchase date) for all purchases made in February 2015. [5 marks] (i) Show the game number and game description for all the games without value for the storage medium. [2 marks] Client table. The view should include the clients in China only. [3 marks]
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