1 / 3

Download sql script file sailors.txt Create and populate those tables Try the following queries: Q1, Q12, Q21, Q26, Q31,

Download sql script file sailors.txt Create and populate those tables Try the following queries: Q1, Q12, Q21, Q26, Q31, Q32 . stime. ename. dname. eid. salary. Employee. workin. Lab Exercise 1. Employee int, varchar2(20), decimal(10,2) 22,'Dustin',10000.0 23,'Bob',15000.0

zerlina
Télécharger la présentation

Download sql script file sailors.txt Create and populate those tables Try the following queries: Q1, Q12, Q21, Q26, Q31,

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Download sql script file sailors.txt • Create and populate those tables • Try the following queries: • Q1, Q12, Q21, Q26, Q31, Q32

  2. stime ename dname eid salary Employee workin Lab Exercise 1 Employee int, varchar2(20), decimal(10,2) 22,'Dustin',10000.0 23,'Bob',15000.0 24, 'Dustin',20000.0 Department 101,'cs','keenedy‘ 102,'ee','smith‘ Workin int, int, date 22,101,'10-OCT-98‘ 22,102, '10-JAN-99‘ 23,102,'15-OCT-98’ 24,101, '10-OCT-01‘ did daddress Department • Map ER to relation tables • Populate table • Q1 “find the name of employees who work at cs dept” • Q2 “find the name of emplyees who have not worked at dept 101”

  3. Lab 2 Please insert more tuples Q3 “find the average salary of employees” Q4 “find the average salary of employees for each dept.” Q5 ”Find the average salary of employes for each department that has at least 3 SUCH employees” Q6 “find the average salary of employees whose salary is above 9000” for each department that has at least three SUCH employees. Employee 3,‘Alice',8000.0 4,‘Mike',7000.0 5, ‘Alex',10000.0 6,’David’,20000.0 Department 103,‘sis',‘carc‘ Workin 3,103,'10-OCT-00‘ 4,103, '10-JAN-00‘ 5,103,'15-OCT-00’ 6,102, '10-OCT-01‘

More Related