Sql select employee from table with at least one department, Database Management System

Assignment Help:

Consider employee (e_no, e_name, e_salary, d_code), dept
(d_code, d_name) and dependent (depndt_name, e_no, relation).
Show the names of employees in purchase and accounts departments with at least one dependent.

SELECT e_name FROM employee, dependent, dept
WHERE employee.d_code=dept.d_code
AND employee.e_no=dependant.e_no
AND d_name IN (‘ACCOUNTS', ‘PURCHASE')
GROUP BY e_name
HAVING COUNT (e_no)>=1


Related Discussions:- Sql select employee from table with at least one department

To eliminate duplicate rows-data manipulation language, To eliminate duplic...

To eliminate duplicate rows (distinct operator)  Example: SELECT DISTINCT DEPTNO FROM EMP;

Large Project, Can you help me with the following: Drop statements for all...

Can you help me with the following: Drop statements for all objects in the lab project. Create statements for all objects of the lab project Create indexes for foreign keys Cre

State the process of inheritance adjustment, Inheritance Adjustment As...

Inheritance Adjustment As in object oriented analysis and design terms inheritance defines a relationship between classes, where as one class shares structure or behaviour def

What is known as clustering file organization, What is known as clustering ...

What is known as clustering file organization? In the clustering file organization, records of several dissimilar relations are stored in the similar file.

Normalization, in case of functional dependencies how we get the higher nor...

in case of functional dependencies how we get the higher normal form.

The tools that are available for managing mysql server, Describe the tools ...

Describe the tools that are available for managing MySQL Server. Given below are the tools to manage MySQL server: mysqld - MySQL server daemon. This is used to begain t

What is a primary index, What is a primary index? A primary index is an...

What is a primary index? A primary index is an index whose search key also explains the sequential order of the file.

Data warehousing and business intelligence, I need help with data warehousi...

I need help with data warehousing and business intelligence course project about designing a data warehouse for a jewelry company that does not have one

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd