Question: Exercises: a) Insert at least 5 rows for each table (logical insertion). b) Find all agents that have at least one customer. c) Find all

Exercises:
a) Insert at least 5 rows for each table (logical insertion).
b) Find all agents that have at least one customer.
c) Find all agents that have customers with order amount higher than 10.
d) Find all customers who works in the same area as their agents.
e) Create a view of the number of customers with order amount between 5 and 15.
USE Join to solve b,c and d
I need the code in database
 Exercises: a) Insert at least 5 rows for each table (logical
insertion). b) Find all agents that have at least one customer. c)
Find all agents that have customers with order amount higher than 10.

2. Exercises: a) Insert at least 5 rows for each table (logical insertion). b) Find all agents that have at least one customer. c) Find all agents that have customers with order amount higher than 10. d) Find all customers who works in the same area as their agents. e) Create a view of the number of customers with order amount between 5 and 15. USE Join to solve b,c and d 34 Exercises: Create tables CUSTOMER CUST_CODE VAROHAR(6) CUST_NAME VARCHAR(40) CUST_CITY CHAR(35) WORKING_AREA VARCHAR(35) CUST_COUNTRY VARCHAR(20) GRADE INT OPENING_AMT DECIMAL (12,2) RECEIVE_AMT DECIMAL(12,2) PAYMENT_AMT DECIMAL(12,2) OUTSTANDING_AMT DECIMAL (12,2) PHONE_NO VARCHAR(17) AGENT_CODE CHAR(6) Indexes 1 AGENTS AGENT_CODE CHAR(6) 477 AGENT_NAME CHAR(40) WORKING_AREA OHAR(35) COMMISSION DECIMAL ( 10,2) PHONE_NO CHAR(15) 1 COUNTRY VARCHAR(25) Indexes 1 1 ORDERS ORD_NUM DECIMAL(6,0) ORD AMOUNT DECIMAL (12,2) ADVANCE_AMOUNT DECIMAL (12,2) ORD DATE DATE **CUST_CODE VARCHAR(6) * AGENT_CODE CHAR(6) ORD_DESCRIPTION VAROHAR (60) Index

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!