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

What is sql server agent, What is SQL Server Agent? SQL Server agent pl...

What is SQL Server Agent? SQL Server agent plays a significant role in the day-to-day tasks of a database administrator (DBA). It is often overlooked as one of the major tools

What is olap, What is OLAP? OnLine Analytical Processing (OLAP) is a Bu...

What is OLAP? OnLine Analytical Processing (OLAP) is a Business Intelligence (BI) reporting system. OLAP gives the user with the capability to sum, count, average and do other

Define view? how it is related to data independence, A View may be defi...

A View may be defined of as a virtual table, that is, a table that does not really exist in its own right but is instead inferred from one or more underlying base data table. T

Describe the major steps in the implementation process, Question: (a) ...

Question: (a) One of the steps in the five-step problem-solving model is implementation. Implementation is considered a key step in the problem-solving model. A problem may be

What is enterprise resource planning, What is Enterprise Resource Planning ...

What is Enterprise Resource Planning (ERP), and what kind of a database is used in an ERP application? Enterprise Resource Planning (ERP) is an information system used in manuf

Microeconomic, anyone have a textbook solutions case fair, 8 edition of vo...

anyone have a textbook solutions case fair, 8 edition of vol 1 ?, please give me

What are the components of storage manager, What are the components of stor...

What are the components of storage manager? The storage manager components include a) Authorization and integrity manager b) Transaction manager c) Buffer manager d

Which model is record based logical model, Which model is record based logi...

Which model is record based logical model? Network Modelis basically known as record based logical model.

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