use a subquery to find the sales rep id, first name, and last name of each sales rep who represents at least one customer with a credit limit of $500. list each sales rep only once in the results.

Respuesta :

Using the subquery to find the sales rep id, first will be

SELECT rep.rep_num,rep.last_name,rep.first_name FROM rep WHERE rep.rep_num IN (SELECT rep_num FROM customer WHERE credit_limit>5000);

What is a Subquery?

A Subquery, Inner query, or Nested query is a query that is placed within the WHERE clause of another SQL query. A subquery is used to return data that will be utilized as a condition in the main query to further restrict the data to be retrieved.

A subquery is a query that is contained within another query statement. Subqueries are also known as sub-SELECTs or nested SELECTs. Subqueries can use the complete SELECT syntax.

SQL subqueries are classified as single-row subquery, multiple row subquery, multiple column subquery, correlated subquery, and nested subquery.

Learn more about query on:

https://brainly.com/question/28481998

#SPJ1

Otras preguntas