Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CREATE TABLE Agents ( agentNo VARCHAR(4), fName VARCHAR(20), lName VARCHAR(20), branchNo VARCHAR(4), salary NUMBER(8,2), dob DATE, address VARCHAR(50), city VARCHAR(30), county VARCHAR(30), state VARCHAR(2), zip

image text in transcribed

CREATE TABLE Agents ( agentNo VARCHAR(4), fName VARCHAR(20), lName VARCHAR(20), branchNo VARCHAR(4), salary NUMBER(8,2), dob DATE, address VARCHAR(50), city VARCHAR(30), county VARCHAR(30), state VARCHAR(2), zip VARCHAR(5), phone1 VARCHAR(20), phone2 VARCHAR(20), email VARCHAR(50), PRIMARY KEY (agentNo));

It's not letting me post the whole table unfortunately

16- List the first name, the last name, the address, the city, the state, the branchNo, and the email of agents working in the branch B005 and having email addresses from yahoo.com. 17- List the first name, the last name, the address, the city, the state, the branch No, and the email of agents working in the branch B005 and having email addresses ending in extensions other than.com. 18- List full details of agents with empty (NULL) email addresses. 19- Display the total number of agents. Note: Use the COUNT aggregate function. 20-Display the minimum, the average, and the maximum salaries of all agents. 21- Display the number of agents living in New York State (NY) and the sum of their salaries. 22- Display the number of agents who work in the branch B002 and have salaries greater than $40000 23- Display, in each state, the number of agents sorted in the descending order. 24- Display the number of agents in each branch and the sum of their salaries. 25-In each branch, display the number of agents living in New Jersey (NJ) or New York (NY) states and the average of their salaries. 26- Exclude, from the list you displayed in the previous task, the branches that have salary averages less than $34000

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

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions

Question

Are these written ground rules?

Answered: 1 week ago

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago