Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 4 Answer the following questions based on the given tables named Team and Donation with the appropriate SQL statements. Also provide your answers with
Question 4 Answer the following questions based on the given tables named "Team" and "Donation" with the appropriate SQL statements. Also provide your answers with screenshots of the SQL result sets. The SQL scripts for creating the "Team" and "Donation" tables are provided at the Appendix shown at the end of the paper. (a) Write SQL statement to select data based on a pattern on JeamNum that can return the following outcome: (2 marks) (b) Write SQL statement to select data based on a pattern on JeamNum that returns all the rows ended with 500 . (2 marks) (c) Write SQL commands to select all the areas in Donation table to produce the following result. (1 mark) (d) Write SQL commands to select all areas with Amount that is less than 300 in Donation table. (2 marks) (e) Write SQL commands to select all records for the Melaka and Seremban areas in Donation table by using the IN operator. (2 marks) (f) Write SQL command to display all the contents of Donation table by the amount starting from the highest amount to the lowest amount. (2 marks) (g) Write SQL command to find out the number of area entries in the Donation table. Write SQL command to find out the number of area entries where areas with the same names are counted only as one area in the Donation table. (1.5 marks) Write SQL command to find out the highest amount in the Donation table. (1.5 marks) Write SQL command to find out the lowest amount in the Donation table. (1.5 marks) Write SQL command to calculate the Total Amount for each area where the total amount must be at least 300 in the Donation table. Write SQL statements to create a new table named "Borrow" based on the following description: (4 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