Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Consider the following 3 tables below. Salesperson Customer ID Name Age Salary ID Name City Industry Type 1 Abe 161 140000 4 Samsonic pleasant

image text in transcribed

image text in transcribed

image text in transcribed

2. Consider the following 3 tables below. Salesperson Customer ID Name Age Salary ID Name City Industry Type 1 Abe 161 140000 4 Samsonic pleasant 2 Bob 34 44000 6 Panasung Joaktown 5 Chris 34 40000 7 Samony jackson 7 Dan 41 52000 9 Orange Jackson B 8 Ken 57 115000 I Joe 38 38000 Orders Number order date cust id salesperson id Amount 8/2/96 4 540 20 1/30/99 4 1800 7/14/95 9 40 1/29/98 7 2 2400 50 2/3/98 16 17 3/2/98 70 5/6/98 9 7 460 600 a) Write SQL query to find the order number and date of the orders that are not from Samsonic. Write SQL query in the box below [3 Marks) Write the resulting answer in the box below [2 marks] b) Write SQL query to find the ID of salespeople that have 2 or more orders. Write SQL query in the box below (3 Marks Write the resulting answer in the box below [2 marks] c) Write SQL query to find the name, age and salary of all the salespeople who have not placed an order. Write SQL query in the box below (3 Marks] Write the resulting answer in the box below [2 marks] d) Write SQL query to find out the total revenue amount generated in each year? Hint: Use GroupBy clause. Write SQL query in the box below [5 Marks]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential Data Protection For Estate Agencies In Singapore 2024

Authors: Yang Yen Thaw Yt

1st Edition

B0CQK79WD3, 979-8872095392

More Books

Students also viewed these Databases questions

Question

4. Explain why strategic planning is important to all managers.

Answered: 1 week ago

Question

Write a Python program to check an input number is prime or not.

Answered: 1 week ago

Question

Write a program to check an input year is leap or not.

Answered: 1 week ago