We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byJovan Mollick
Modified over 2 years ago
2 Find the names of all employees whose salary greater than all managers salary.
3 select Ename from EMP where sal > all (select sal from EMP where E# in ( select mgr from DEPT)) select Ename from EMP where sal > (select max(sal) from EMP where E# in ( select mgr from DEPT))
4 select e.ename from e emp Where not exist (select d# from d dept Where d.mgrsal > e.sal); select ename from emp Where sal > sal Sal in (select max(sal) from mgr )
5 Select ename from emp where emp.sal > (select distinct sal from MNQ where MNG.sal = MAX(mng.sal))
6 select ename from emp Where sal > some (select sal from manager); select name from emp Where emp.sal > every (select sal from manager )
7 Find all departments name which have at least five employees whose salary grater than $5000.
8 Select dname From Dept Where dname in (select salary, count(distinct ename) From EMP where salary>5000 group by dept
9 Select dname From Dept, Emp Where (select count(*) From EMP where salary>5000 and dept.d#)>4
10 Select dname From Dept,Emp Where Dept.dname=Emp.ename AND (select count(dname) From Dept,Emp where Dept.dname=Emp.ename AND salary>5000)>5
11 Select d#, dname From Dept,Emp Where Dept.d#=Emp.d# AND (select num, count(dname) From Dept,Emp group by emp.d# having salary>5000)>=5
12 Select dname From Dept, Emp Where count (select * From Emp where salary>5000 AND d#=Emp.d#);
13 Select dept.dname from emp, dept Where dept.d#=emp.d# and emp.sal>5000 Group by dept.dname Having count(*) >=5 ;
14 Select d.dname From Dept d Where d.d# in (select e.d# From Emp e where e.sal>5000 Group by e.d# Having count(*)>5);
Introduction to Relational Database Systems 1 Lecture 4.
Exercise 2 Relational Calculus Database System-dww.
Ihr Logo Fundamentals of Database Systems Fourth Edition El Masri & Navathe Chapter 8 SQL-99: Schema Definition, Basic Constraints, and Queries.
SQL: Queries. Relational Schema Sailors (sid, sname, rating, age) Boats (bid, bname, color) Reserves (sid, bid, day)
SQL – Lesson II Grade 12. The SELECT statement The SELECT statement is used to query the database and retrieve data that matches the criteria that you.
Active database concepts 1. 2 Introduction DB triggering event triggered action think of examples.
1 Structured Query Language (SQL) Mail: Phone: YM: talim_bansal Blog:
Views-basics 1. 2 Introduction a view is a perspective of the database different users may need to see the database differently; this is achieved through.
Introduction to SQL 1 Lecture 5. Introduction to SQL 2 Note in different implementations the syntax might slightly differ different features might be.
Factors, Primes & Composite Numbers by Monica Yuskaitis.
1 Conceptual Design using the Entity- Relationship Model.
WHERE Clause Chapter 2. Objectives Limit rows by using a WHERE clause Use the LIKE operator Effect of NULL values Use compound conditions Use the BETWEEN.
Multiple Table Queries A Guide to SQL – Chapter 5.
Functional Dependencies and Normalization for Relational Databases.
E-learning extended learning for chapter 11 (graphs)
More on Structured Query Language Indra Budi
A Guide to MySQL 4. 2 Objectives Retrieve data from a database using SQL commands Use compound conditions in queries Use computed columns in queries Use.
10/5/2013Multiplication Rule 11 Multiplication Rule 1: If a > b and c > 0 then a c > bc Examples If 7 > 3 and 5 > 0 then 7(5) > 3(5) If 2x + 6 > 8 then.
1 Term 2, 2004, Lecture 6, Views and SecurityMarian Ursu, Department of Computing, Goldsmiths College Views and Security 3.
Oracle 10g & 11g for Dev Virtual Columns DML error logging SQL Pivot/Unpivot regular expressions(REGEXP_*) New Analytic Functions.
Chapter 6 The Relational Algebra Dr. Bernard Chen Ph.D. University of Central Arkansas.
ALGEBRA II SETS : THE COMPLEMENT OF A SET.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 5: Other Relational.
1 Copyright © 2014, 2010, and 2006 Pearson Education, Inc. Absolute-Value Equations and Inequalities Equations with Absolute Value Inequalities with Absolute.
ALGEBRAIC EXPRESSIONS Step 1Write the problem. Step 2Substitute in the values for the unknown (variable). Step 3Use PEMDAS (remember to go left to right).
Classifying Complex Numbers Instructions Click to select an answer. Otherwise use the spacebar to advance.
Structured Query Language b Querying a Single Table b Querying Multiple Tables b EXISTS and NOT EXISTS b Changing Data.
SQL/PL SQL Oracle By Rana Umer. Quiz 2 Q1.Create a table called "Persons" that contains five columns: PersonID, LastName, FirstName, Address, and City.
Right of Way situations Quiz 3. Who must yield in this situation? Uncontrolled intersection 1) A B.
© 2016 SlidePlayer.com Inc. All rights reserved.