Question: Write SQL code that will create the relation shown below. Assume the following attribute data types: Customer_ID: integer Customer_Name: 25 characters Street: 25 characters City:
Write SQL code that will create the relation shown below. Assume the following attribute data types:
Customer_ID: integer
Customer_Name: 25 characters
Street: 25 characters
City: 15 characters
State: 15 characters
Balance: number(8,2)
Credit_Limit: number(8,2)
Rep_Number: integer
Customer (Customer_ID, Customer_Name, Street, City, State, Balance, Credit_Limit, Rep_Number)
Find the ID and name of each customer located in Toronto?
Find the ID and name for all customers with credit limits that exceed their balances?
Find the ID, name and available credit (the credit limit minus balance) for each customer?
Find the total number of customers and the total of their balances?
For each sales rep, list the rep number and the average balance of the reps customers?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
