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

Hoework, Farmer Bob, Farmer Jane and Farmer Jose run a cow farming co-op. ...

Farmer Bob, Farmer Jane and Farmer Jose run a cow farming co-op. For every cow they keep the cow’s name, age (or date of birth), breed and numbered plastic ear tag. The each of t

Explain hierarchical model, Explain Hierarchical Model ? Hierarchical ...

Explain Hierarchical Model ? Hierarchical Model - It was established to model several kinds of hierarchical organizations which exist in the real world. It uses tree structur

BOGUS VS GENUINE EMPOWERMENT, what is bogus empowerment. And what is genuin...

what is bogus empowerment. And what is genuine empowerment

List and also explain the dissimilar stages of ddlc, List and also explain ...

List and also explain the dissimilar stages of DDLC ?

A set of possible data values is called, A set of possible data values is c...

A set of possible data values is called? A set of possible data values is called as domain.

Appointment systems with sms and voice call feedback, Automated system for ...

Automated system for appointment with sms and call confirmation with service providers and user has to be initiate automatically. After selecting time and date to use service, s

What is disadvantage of multiple inheritances, What is disadvantage of mult...

What is disadvantage of multiple inheritances? There is potential ambiguity if the similar variable or method can be inherited from more than one superclass.eg: student class m

Visio diagram - database, The database depicted in the Visio diagram descri...

The database depicted in the Visio diagram describes Proceeding , Article , Researcher , article PublishedIn a proceeding, article WrittenBy researchers and proceedings Edi

List the string operations supported by sql, List the string operations sup...

List the string operations supported by SQL? 1) Pattern matching Operation 2) Concatenation 3) Extracting character strings 4) Converting among uppercase and lower cas

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