Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.) Write an SQL query for the HAPPY INSURANCE database that will for each for each agent that has clients display the agent id and

image text in transcribed

1.)

Write an SQL query for the HAPPY INSURANCE database that will for each for each agent that has clients display the agent id and the number of his/her clients.

2.)

Write the SQL query for the HAPPY INSURANCE database that will, for each area that has more than one agent, display the area id, area name, and the number agents in the area.

Happy Insurance Data CLIENT ClientID ClientName Tom AgentID CIN Client SpouseName Jenny Bill C222 Karin Cole C333 42 Amy ClientIncome 102,000 105,000 80,000 90,000 70,000 180,000 200,000 42 C444 C555 43 Dorothy Ang Tina Christina Amy Mart C666 0777 Vike AGENT AgentID AgentName AgentArea AgentRating Agent Year Of Hire SupervisedBy Kate 1 101 1990 Amy 2 92 2009 Luke 2 100 1992 James 3 90 2010 45 Salcedo 3 100 2018 AgentSalary 102,000 100,000 101,000 90,000 80,000 AREA AreaID AreaName 1 East 2 West AreaHQ Boston San Francisco Chicago Memphis 3 Central South

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

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions