Presentation is loading. Please wait.

Presentation is loading. Please wait.

Practice Project Practice to know SQL

Similar presentations


Presentation on theme: "Practice Project Practice to know SQL"— Presentation transcript:

1 Practice Project Practice to know SQL
Download sql script file sailors.txt Create and populate those tables Try the following queries: Q1, Q12, Q21, Q26, Q31, Q32 Work on the following practice project (Part I and II) and the SQL script file with group ID to TA

2 Practice Project – Part I
Employee int, varchar(20), float 22,'Dustin', 23,'Bob', 24, 'Dustin', Department 101,'cs','keenedy‘ 102,'ee','smith‘ Workin int, int, date 22,101,‘ ‘ 22,102, ‘ ‘ 23,102,‘ ’ 24,101, ‘ ‘ stime salary ename eid dname did daddress workin Employee 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” 6

3 Practice Project – Part II
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', 6,’David’, Department 103,‘sis',‘carc‘ Workin 3,103,‘ ‘ 4,103, ‘ ‘ 5,103,‘ ’ 6,102, ‘ ‘


Download ppt "Practice Project Practice to know SQL"

Similar presentations


Ads by Google