Home / Expert Answers / Computer Science / write-the-following-queries-in-sql-these-are-the-tables-e-do-the-following-queries-1-dis-pa591

(Solved): Write the following queries in SQL These are the tables :) E- Do the following queries: 1. Dis ...



Write the following queries in SQL

E- Do the following queries:
1. Display all data in all tables.
2. Display the department_id and department_name for departme

These are the tables :)

\begin{tabular}{|l|l|l|l|l|l|l|}
\hline \multicolumn{6}{|c|}{ employee } & \\
\hline \( \begin{array}{l}\text { employee } \\

E- Do the following queries: 1. Display all data in all tables. 2. Display the department_id and department_name for departments that has ' ' in the name. 3. Display employee id, employee first and last name (concatenate the name under Full Name column) for the employees whose working in the company more than two years. 4. Use the condition statement for the following question: a. Display all employees name, department id, and salary for 'employee commission' such that: i. are added to employees in department number 101. ii. are added to employees in department number 102 . iii. are deducted from employees in department number 104. iv. Other department remain as is. \begin{tabular}{|l|l|l|l|l|l|l|} \hline \multicolumn{6}{|c|}{ employee } & \\ \hline & \( \begin{array}{l}\text { employee_ } \\ \text { fname }\end{array} \) & \( \begin{array}{l}\text { employee_1 } \\ \text { name }\end{array} \) & address & dep_no & salary & hire_date \\ \hline 2200 & Huda & Ahmad & Albasateen & 102 & 5000 & \\ \hline 2202 & Mona & Saeed & Almarwah & 101 & 4000 & \\ \hline 2204 & Fatimah & Saleh & Alsafa & 102 & & \\ \hline 2206 & Lobna & Muhammad & Alshati & 103 & 5300 & \\ \hline 2208 & Maha & & Almarwah & 103 & 4500 & \\ \hline 2210 & Suha & Rami & Alolaya & 101 & & \\ \hline 2212 & Samirah & Samir & Alworood & 104 & 6000 & \\ \hline 2214 & Sara & & Albasateen & 103 & 2500 & \\ \hline \end{tabular} \begin{tabular}{|l|l|l|} \hline \multicolumn{3}{|c|}{ department } \\ \hline department_ id & department name & manager id \\ \hline 101 & Accounting & 2202 \\ \hline 102 & Administration & 2208 \\ \hline 103 & Information Technology & 2210 \\ \hline 104 & Sale & 2214 \\ \hline \end{tabular} \begin{tabular}{|l|l|l|} \hline \multicolumn{3}{|c|}{ dep manager } \\ \hline manager_id & department_id & office location \\ \hline 2200 & 102 & First Floor \\ \hline 2202 & 101 & Ground Floor \\ \hline 2206 & 103 & First Floor \\ \hline 2212 & 104 & Second Floor \\ \hline \end{tabular}


We have an Answer from Expert

View Expert Answer

Expert Answer


1. Display all data in all tables:SELECT *FROM employeeUNIONSELECT *FROM departmentUNIONSELECT *FROM dep_manager;2. Display the department_id and de
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe