Write query to list the staff who work within the branch, Database Management System

Assignment Help:

Consider the following relations:

BRANCH( bno, street, area, city, pcode, Tel_no, Fax_no)
STAFF( Sno, Fname, Lname, address, position , salary, bno)
Express the subsequent queries in SQL:
(i) List the staff who work within the branch at ‘163 main street'
(ii) Find out staff whose salary is larger than the salary of each member of staff at branch B3.

(i) Select Fname, Lname from STAFF, BRANCH where STAFF.bno = BRANCH.bno and street = ‘163 main street'
(ii) Select Fname, Lname from STAFF where salary > ( select max (salary) from Staff where bno='B3'


Related Discussions:- Write query to list the staff who work within the branch

Explain naivebayessimple algorithem, Use the IRIS dataset that comes with W...

Use the IRIS dataset that comes with Weka to compare the classification performance of the following algorithms. 1. NaiveBayesSimple 2. MultiLayerPerceptron J48 (

What is functional dependency, A Functional dependency is described by ...

A Functional dependency is described by X Y between two groups of attributes Y and X that are subsets of R specifies a constraint on the possible tuple that can make a relation

Online examination system project, entity relationship diagram for online e...

entity relationship diagram for online examination system

What is aggregate function, What is aggregate function? Briefly describe it...

What is aggregate function? Briefly describe it? Aggregate functions are functions that take a collection of values as input and return a one value. SQL offers 5 built-in aggre

What is meant by functional dependencies, What is meant by functional depen...

What is meant by functional dependencies? Consider a relation schema R and α C R and β C R. The functional dependency α ->β  holds on relational schema R if in any legal relati

What is a recursive relationship, Question: (a) Can a set of data requi...

Question: (a) Can a set of data requirements be correctly modelled by two or more different ER diagrams? Explain your answer. You may use a small example, if you think it will

Difference between functions along with or without grouping, Explain the di...

Explain the difference between using functions along with and without grouping attributes in relational algebra. Give examples. Ans: Group functions are used to group data of

Domains, A domain is a set of permissible values that can be given to an at...

A domain is a set of permissible values that can be given to an attribute. So each attribute in a table has a definite domain. Values to these attributes cannot be assigned outside

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