Given your ERD, create a database and relevant tables from your ERD. Create an SQL script for the following scenarios

Hire a tutor for this answer

We have Professional Tutors available for all subjects, Unlock Your Potential with Personalized Tutoring

LiveChat / WhatsApp

Our expert tutors are available 24/7 to help you achieve your academic goals

Ask a New Question

We provide personalized tutoring and homework assistance services to help students of all levels succeed.

Question

3. Given your ERD, create a database and relevant tables from your ERD. Create an SQL script for the following scenarios provided below. (Note you have to insert data into your tables at least 10 rows in each table.)

  1. Write a SQL query to print the names of all customers whose name do not start with John. Sort the result by customer id.
  2. List the customer id, name, transaction amount from transaction report table, customers who have made transaction— that is, for the customers who appear in the transaction report table. Ensure that there no duplicate values in your results.
  3. Write a SQL query to join the table shopping order, customers and payment. Show Shopping order_id, Customer Id, name, Payment id, payment date values.
  4. Write a query to print the customer’s name, ID, transaction amount, and compute the number of transactions, the average transaction amount for each customer. Sort the result by customer id.

Solution

Hire Expert Tutors

Get Professional Tutoring at Low Price in Australia


Professional

Tutoring Services

25,187+

Orders Delivered

4.9/5

5 Star Rating

621

PhD Experts

 

Amazing Features

Plagiarism Free

Top Quality

Best Price

On-Time Delivery

100% Money Back

24 x 7 Support

TOP