EMPLOYEE_COURSE_t
EmployeeID
CourseID
CompletionDate
EMPLOYEE_t
EmployeeID (PK)
EmployeeFirstName
EmployeeLastName
EmployeeJobTitle
EmployeeStreet
EmployeeCity
EmployeeState
EmployeeZip
EmployeeHireDate
ManagerID
1.Which employees have not completed course ID = 90? Hint: name of employee only, and the best way to determine this is by having a subselect statement to determine the EmployeeIDs that have completed CourseID 90, and then have a the select statement use the output of the subselect to determine which of all of the employees are not in the list provided by the subselect.
2.Who is the manager of the manager of the sales reps? Hint: Show the name of the sales rep’s manager’s manager only, and your single SQL statement will need to determine the sales rep’s manager before it can determine the manager of the sales rep’s manager.
--1 as explanation is already give I'm going to give you query directly.
Select employeeid, employeeFirstName from employee_t where Employeeid not in ( selevt Employeeid from employee_course_t where courseid=90);
--2
Below 1st we have extracted manger of sales rep. Those manger are passed as employees to emplyee table to get their managers.
Select Managerid from Employee_T where Employeeid in ( Select ManagerID from Employee_t where EmployeeJobTitle='Sales Rep')
EMPLOYEE_COURSE_t EmployeeID CourseID CompletionDate EMPLOYEE_t EmployeeID (PK) EmployeeFirstName EmployeeLastName EmployeeJobTitle EmployeeStreet EmployeeCity EmployeeState EmployeeZip EmployeeHireDate ManagerID...
If possible please just send the SQL statement. Thank you
Each question within deliverable 3 must begin on a new page and be sure to document the question as the title of each item at the top of each page. Also, using a 12-point font, include the SQL statement and then provide a screen shot of each query. The screen shots must include both the SQL statement and the results for each item below based on the data entered in...
Please help me with this SQL Statement: Which sales representative has sold the most products? Hint: Name of the sales rep and a number representing the total number of distinct products sold by that rep. This is the number of different products they have sold, not the quantity of any products. There are two highest values so I cannot do SELECT Top 1. CUSTOMER_T CustomerID (PK) CustomerName CustomerStreet CustomerCity CustomerState CustomerZip CreditLimit SalesRepID (FK) of EMPLOYEE_T ORDER_T OrderID (PK) CustomerID...
SQL queries and procedures TABLE: Employees Business Rules: EmployeeID is defined as the primary key. Address has been denormalized to include City and State for performance reasons. DeptNbr is a foreign key that references DeptNbr in the Department table Manager is a foreign key that references EmployeeID in the Employees table Data Structure: (EmployeeId, LastName, FirstName, Street, City, State, Zip, DateOfHire, DateOfBirth, JobTitle, Salary, DeptNbr(fk), Manager(fk)) TABLE: Department Business Rules: DeptNbr is defined as the primary key. Data Structure: (DeptNbr,...
SQL query: Write an SQL query that will output the last name, employee id, hire date and department from the employee table. Pick only those employees whose department ID is specified in the employee table. If the employee id is 777, name is ABC and hire date is 01-JAN-2016, the output should look as follows - 'Stephen (Employee ID - 777) was hired on the 1st of January, 2016 – Department: 90'. Note - The date should not have preceding...
There are 7 problems that require using joins. Each problem has 10 points. 1. Write an SQL command that will find any customers who have not placed orders and sort them out by CustomerID in ascending order. 2. List the employees and supervisors names for each supervisor who supervises more than two employees. 3. List the name of each employee, his or her birth date, the name of his or her manager, and the manager’s birth date for those employees...
Please refer to the following business scenarios:
(i) Using SELECT statements of SQL, find the employee id, first
name, last name, job title and email of all employees working in
Asia (i.e. all countries coming from the region
‘Asia’). This query must be implemented
as a nested query!
(ii) Using SELECT statements of SQL, find the employee id, first
name, last name, job title and supervisor id of employees who had
worked for more than 3 years and completed...
Please answer this questions as required
I couldn't delete the old pic so the new one is butter
and for the same question.
RealGree uses the paper form as below to record the weekly (just one week in this 5. A lawn and tree care company ion) informati application to keep track of the information of the part-time employees. Please (a) develop the E-R diagram (8 points). ion about is part-time employees (one form for one employee). The company asks...
The following ERD and two tables represent a partial model similar to what we used in class. Answer all questions by writing SQL syntax to solve each. If a question requires more time, please move on to the next. Employee EmpNo (PK) Ename Job ManagerID HireDate Salary Commission DeptNo (FK) Department DeptNo Dname Location 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON Department DeptNo (PK) Dname Location 1400 Employee Monthly EmpNo Ename Job ManagerID HireDate...
Hi. Can someone please help me with this SQL question? I asked this before, but someone just cut and pasted a completely incorrect answer that they found online. Please be genuine in your response. Write an SQL statement to show the sum of HoursWorked for each type of OWNER but exclude services of employees who have ExperienceLevel of Junior. OWNER ( OwnerID, OwnerName, OwnerEmail, OwnerType ) PROPERTY_TYPE ( PropertyID, PropertyName, PropertyType, Street, City, State, Zip,OwnerID ) PROPERTY_SERVICE (PropertyServiceID, PropertyID, ServiceID,...
Customer (CustomerId, CustomerName) Employee (EmployeeId, EmployeeName, Salary, SupervisorId) Product(ProductId, ProductName, ListPrice) Orders (OrderId, OrderDate, CustomerId, EmployeeId, Total) OrderedProduct (OrderId, ProductId, Quantity, Price) Write the code to complete the methods in OrderJDBC.java (look for TODO items). <---**IN BOLD** throughout code. /* OrderJDBC.java - A JDBC program for accessing and updating an order database on MySQL. */ import java.io.File; import java.math.BigDecimal; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; import java.util.Scanner; /** * An application for...