You have two tables named employees and sales. You want to identify the sales representatives who have generated at least $100,000 in revenue. Which query should you issue?
Answers
Answer:
The SQL query to be used to get the desired output is:
SELECT e.first_name, e.last_name, s.sales
FROM employees e, sales s
WHERE e.employee_id = s.employee_id AND revenue >= 100000;
In database a query is a question generally expressed in a formal way. A database query can be a select query or an action query. A select query retrieves data from the database whereas an action query performs certain actions on the database such as inserting, updating and deleting the data.
Answer:
The SQL query to be used to get the desired output is:
SELECT e.first_name, e.last_name, s.sales
FROM employees e, sales s
WHERE e.employee_id = s.employee_id AND revenue >= 100000;
In database a query is a question generally expressed in a formal way. A database query can be a select query or an action query. A select query retrieves data from the database whereas an action query performs certain actions on the database such as inserting, updating and deleting the data.