Question
Part II: Group-by and subqueries The following questions use the Spy and Sailors database. Write the SQL for the following queries. 1) List the sailor
Part II: Group-by and subqueries The following questions use the Spy and Sailors database. Write the SQL for the following queries. 1) List the sailor id and name for each sailor who has reserved two different red boats. Make sure that each sailor id/name is listed at most once. You must use group by/having.
2) List the missions and their status for each team.
3) For each country in agent, list the country and the count of agents in the country, the min, max, and average salary for all agents who are from the country.
4) List the language and the count of the number of agents with the skill of Lip Reader who speak that language.
5) Return the average salary and country for which the agents have the lowest average salary.
6) List the agent id, first, middle, and last provided the number of languages that they speak is four times or more larger than the number of skills they have. For example, if an agent speaks 4 languages and has 1 skill, then that agent id belongs in this query answer. If another agent speaks 10 languages and has 2 skills, then that agent id belongs in this query answer.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started