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

Explain the query processing, Explain the Query Processing  Data Query ...

Explain the Query Processing  Data Query Processing permits a user to report or analyze structured and unstructured data pulled from multiple data sources.

Determine candidate and primary key, A video rental company has several bra...

A video rental company has several branches. The data held on each branch is the branch address made up of street, city, state, and zip code, and the telephone number. Ea

Aggregation, What does Aggregation mean?

What does Aggregation mean?

Can a domain, Can a domain, assigned to a data element be changed? Yes....

Can a domain, assigned to a data element be changed? Yes.  We can do so by just overwriting the entry in the field domain.

What is a value, What is a value? A data value is used for identity. Th...

What is a value? A data value is used for identity. This form of identity is used in relational systems.eg: The primary key value of a tuple recognize the tuple.

What is magnetic disks, What is magnetic disks?explain it? Magnetic dis...

What is magnetic disks?explain it? Magnetic disk provides the bulk of secondary storage of modern computer system. The disk capacity is growing at over 50% per year. But the st

Perform an exploratory analysis on the entire dataset, Australian Bureau of...

Australian Bureau of Statistics (ABS) provides retail data for different groups and different states as well as the aggregate numbers. Table 11 " Retail Turnover, State by Industry

What is candidate key, What is Candidate Key Super Key or Candidate Ke...

What is Candidate Key Super Key or Candidate Key: It is such an attribute of a table that can uniquely recognize a row in a table. Generally they have unique values and can n

Differance between internal and external schema, Differance between interna...

Differance between internal and external schema? Internal and external schema: Internal Schema • Describes the physical storage structure • Uses a physical data model External

Give the reasons for allowing concurrency, Give the reasons for allowing co...

Give the reasons for allowing concurrency? The reasons for allowing concurrency is if the transactions run serially, a short transaction might have to wait for a preceding long

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