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...
Given the following two related tables, write the SQL SELECT statement to solve the following queries...
Given the following two related tables, write the SQL SELECT statement to solve the following queries about developers (Dev) and programs (Prog). The id column in Dev and Prog is the relation between the two tables. Dev(id, name, dept, salary) Prog(id, title, language, lines, size); 1. List name of Devs who have written more than 1000 line programs 2. List title of all programs written in C++ language 3. List name of all developers who have written C++ programs
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...
3. How many people have the last name King Use PL/SQL? Code: Output: 4. Change the...
3. How many people have the last name King Use PL/SQL? Code: Output: 4. Change the first name to Stephen for the person with the last name King Use PL/SQL. Code: Output: Copy the record showing name change: Code: Output: 5. Delete all employees in Department 20. Use %TYPE for the variable. Use SQL%ROWCOUNT to see how many records were deleted. Code: Copy output showing ROWCOUNT: 6. Use a merge to merge the original employees table into emp_test. Do UPDATE...
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...
Please provide SQL code for following question, and please make sure your answer is LEGIBLE. Thank...
Please provide SQL code for following question, and please make sure your answer is LEGIBLE. Thank you. Retrieve a list of employees and the projects they are working on, ordered by department, and within each department, ordered alphabetically by last name, first name
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...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT