Question

SQL: Join the 'employees' and the 'dept_manager' tables to return a subset of all the employees...

SQL:

Join the 'employees' and the 'dept_manager' tables to return a subset of all the employees whose last name is Markovitch.

Homework Answers

Answer #1

Join the 'employees' and the 'dept_manager' tables to return a subset of all the employees whose last name is Markovitch.

SELECT E.EMPLOYEE_ID,E1.FIRST_NAME FROM EMPLOYEES E FULL OUTER JOIN DEPT_MANAGER E1 ON E.LAST_NAME = E1.LAST_NAME WHERE E.LAST_NAME='Markovitch';

The above query will give the output whose Last_name is Markovitch You can use 2 table name which you want to join. In this Query I have taken E as Employee Table E1 as Dept_Manager Table and I have used Full Outer Join to combine Employees and Dept_Manager Table and in where condition I have used 'Markovitch' which will get all the dats whose name is 'Markovitch' from both tables.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write and run the SQL to list the ClassID, ClassDescription, ClassroomID, BuildingName  and Capacity for all classes,...
Write and run the SQL to list the ClassID, ClassDescription, ClassroomID, BuildingName  and Capacity for all classes, using the inner join [matching on ClassroomID] to extract variables from the BSU_Class and BSU_Classrooms tables. Sort the output in ascending sequence by ClassID and Building name
EMPLOYEE Field Name EMP_ID EMP_LNAME EMP_MI EMP_FNAME EMP_SEX EMP_AGE EMP_SALARY EMP_HIREDATE DEPT_CODE Table: DEPARTMENT DEPT_CODE BIOL...
EMPLOYEE Field Name EMP_ID EMP_LNAME EMP_MI EMP_FNAME EMP_SEX EMP_AGE EMP_SALARY EMP_HIREDATE DEPT_CODE Table: DEPARTMENT DEPT_CODE BIOL CPTR HIST MATH RELB Data Type Text Text Text Text Text Number Currency Date/Time Text DEPT_TITLE Biology Computer Science History Mathematics Religion    Field Name DEPT_CODE DEPT_TITLE Data Type Text Text INSTRUCTIONS Use SQL commands to create the tables and enter the data shown above using MS Access. Write the following SQL statement given below: 1. 2. 3. 4. 5. 6. 7. 8. 9....
Lab 5 Queries with Multiple Tables In this lab, we do queries more than one table....
Lab 5 Queries with Multiple Tables In this lab, we do queries more than one table. SQL provides two different techniques for querying data from multiple tables: • The SQL subquery • The SQL join As you will learn, although both work with multiple tables, they are used for slightly different purposes. We used WMCRM database which is what we created in Lab 4. Here is the summary of the database schema (where schema is used in its meaning of...
Write a SQL statement which joins the parts table with the supplier table and lists the...
Write a SQL statement which joins the parts table with the supplier table and lists the part_name, supplier_name for all parts in the part table. The supplier_id column in the suppliers table is the primary key in the suppliers table, and this key has been exported to the parts table where it is a foreign key. You should use an inner join for this query. Write a SQL statement which joins the parts table with the suppliers table and lists...
Using the Company database in Oracle, construct SQL queries for the following (note: I will make...
Using the Company database in Oracle, construct SQL queries for the following (note: I will make the files to create and populate the Company database available on Isadore shortly): List the last name and address of managers who have a dependent with the same first name as themselves. Retrieve the names of all employees who are directly supervised by ‘Franklin Wong’. Retrieve the names of employees in the Research department who work more than 20 hours per week on the...
Created the database and all the tables in phpMyadmin. In addition, write all the sql statements...
Created the database and all the tables in phpMyadmin. In addition, write all the sql statements used in perforing the tasks in a word document and submit that for grading. Lab 1: CREATE STATEMENT This statement is used to create a database or a table. CREATE DATABASE This statement is used to create a database Syntax: CREATE DATABASE database_name; OR CREATE SCHEMA database_name; Example: CREATE DATABASE Nyumbani; OR CREATE SCHEMA Nyumbani ; CREATE TABLE This SQL statement is used to...
1. We sell music  to our members. Employees recommend titles by rating them from1 to 5 with...
1. We sell music  to our members. Employees recommend titles by rating them from1 to 5 with 1 being not very good to 5 being very good What would your strategy be to write SQL code for the following query: "Show the members and the title and price for each of the products they bought." I would use a left outer join I would not use a join because the data comes from one table I would use an equality join...
Write a script to create the following tables with attributes as specified(SQL) Customer table with Customer’s...
Write a script to create the following tables with attributes as specified(SQL) Customer table with Customer’s id, name, address, city as varchar, customer’s date of birth as date type and zip code number where the customers id is the primary key in the table, name and date of birth are mandatory. Id has a 10-character limit, name, address and city have a 50-character limit, zip has a 5-character limit Product Table with Product id, description and finish as varchar, price...
Subtask 10.2.1 Run the following JOIN of two tables which has two restrictions. Examine the output...
Subtask 10.2.1 Run the following JOIN of two tables which has two restrictions. Examine the output – is this what you expect? Prefix the query with “EXPLAIN EXTENDED” and review the output. SQL EXPLAIN EXTENDED SELECT * FROM Orders NATURAL JOIN Order_Details WHERE QuotedPrice > 1000 AND OrderDate BETWEEN '2012-10-01' AND '2012-10-31'; Examine the query plan output with the help of the column explanations given above. Describe in your own words how the DBMS is fetching the rows. For each...
Microsoft SQL Server Management Studio 1. Write SQL statements to insert, update, and delete a record...
Microsoft SQL Server Management Studio 1. Write SQL statements to insert, update, and delete a record in each of the Clients, Assist, Task, Outreach, and Specialist tables. Finish by inserting records into the tables (sample data follows). 5 points 2. Write Select statements to organize data from different tables. 4 points each Select all clients who have had an assist; include client name, assist date and type. List all assists including the name of the Specialist. List client names having...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT