What's wrong with my SQL code? It doesn't run. The SQL files are in the images attached. Queries should extract the answers directly. Use Employee.sql and Office.sql and write queries to extract the following information: # Get IDs of employees whose first name starts with “pa”, followed by three characters and then ends with “a”. Show the first name along with the employee ID. # SELECT FirstName FROM employees WHERE length(FirstName) = 6 and FirstName like ’Pa%s’; # How many employees at non-regional offices were hired after 2000? # SELECT count employees.hired_date, office.regionaloffice, FROM employees INNER JOIN ON employees.EmployeeID=office.employeeid WHERE Hiredate>('2001-1-1') and title='accountant'; # Get the Employee ID of the newest Account Rep who is working in a location with audit code=100. # SELECT employees.EmployeeID FROM employees INNER JOIN ON employees.EmployeeID=office.employeeid WHERE auditcode=100 and regionaloffice='no'; # Get the average salaries for each of the following three groups: poor-performing account reps, poor-performing managers, and poor-performing trainees. Show the title and performance along with the average salaries. # select FirstName, avg(salary), performance='poor' from employees group by title
What's wrong with my SQL code? It doesn't run. The SQL files are in the images attached. Queries should extract the answers directly. Use Employee.sql and Office.sql and write queries to extract the following information: # Get IDs of employees whose first name starts with “pa”, followed by three characters and then ends with “a”. Show the first name along with the employee ID. # SELECT FirstName FROM employees WHERE length(FirstName) = 6 and FirstName like ’Pa%s’; # How many employees at non-regional offices were hired after 2000? # SELECT count employees.hired_date, office.regionaloffice, FROM employees INNER JOIN ON employees.EmployeeID=office.employeeid WHERE Hiredate>('2001-1-1') and title='accountant'; # Get the Employee ID of the newest Account Rep who is working in a location with audit code=100. # SELECT employees.EmployeeID FROM employees INNER JOIN ON employees.EmployeeID=office.employeeid WHERE auditcode=100 and regionaloffice='no'; # Get the average salaries for each of the following three groups: poor-performing account reps, poor-performing managers, and poor-performing trainees. Show the title and performance along with the average salaries. # select FirstName, avg(salary), performance='poor' from employees group by title
What's wrong with my SQL code? It doesn't run. The SQL files are in the images attached. Queries should extract the answers directly. Use Employee.sql and Office.sql and write queries to extract the following information: # Get IDs of employees whose first name starts with “pa”, followed by three characters and then ends with “a”. Show the first name along with the employee ID. # SELECT FirstName FROM employees WHERE length(FirstName) = 6 and FirstName like ’Pa%s’; # How many employees at non-regional offices were hired after 2000? # SELECT count employees.hired_date, office.regionaloffice, FROM employees INNER JOIN ON employees.EmployeeID=office.employeeid WHERE Hiredate>('2001-1-1') and title='accountant'; # Get the Employee ID of the newest Account Rep who is working in a location with audit code=100. # SELECT employees.EmployeeID FROM employees INNER JOIN ON employees.EmployeeID=office.employeeid WHERE auditcode=100 and regionaloffice='no'; # Get the average salaries for each of the following three groups: poor-performing account reps, poor-performing managers, and poor-performing trainees. Show the title and performance along with the average salaries. # select FirstName, avg(salary), performance='poor' from employees group by title
What's wrong with my SQL code? It doesn't run. The SQL files are in the images attached. Queries should extract the answers directly.
Use Employee.sql and Office.sql and write queries to extract the following information:
# Get IDs of employees whose first name starts with “pa”, followed by three characters and then ends with “a”. Show the first name along with the employee ID. # SELECT FirstName FROM employees WHERE length(FirstName) = 6 and FirstName like ’Pa%s’;
# How many employees at non-regional offices were hired after 2000? # SELECT count employees.hired_date, office.regionaloffice, FROM employees INNER JOIN ON employees.EmployeeID=office.employeeid
WHERE Hiredate>('2001-1-1') and title='accountant';
# Get the Employee ID of the newest Account Rep who is working in a location with audit code=100. # SELECT employees.EmployeeID FROM employees INNER JOIN ON employees.EmployeeID=office.employeeid
WHERE auditcode=100 and regionaloffice='no';
# Get the average salaries for each of the following three groups: poor-performing account reps, poor-performing managers, and poor-performing trainees. Show the title and performance along with the average salaries. # select FirstName, avg(salary), performance='poor' from employees group by title
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.