Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create Database : Records Create Table Emp EmpNo EName Job Manager No (Not (Not Null) (Not Null) Null, unique) 1001 Gohar Salesman 512 1002 Ahmed

image text in transcribed
Create Database : Records Create Table Emp EmpNo EName Job Manager No (Not (Not Null) (Not Null) Null, unique) 1001 Gohar Salesman 512 1002 Ahmed Clerk 511 Hire Date (Not Null) Commission Salary (Not Null, >1000) DeptNo (Not Null) 1600 400 20 10 1003 Shahid Manager SOS 18-Dec-11 28-Nov-11 11-Jun-11 15-Dec-10 18-Dec-10 20 1250 10000 2700 12000 1004 Toqeer 512 300 20 Salesman Manager 1005 Asif 505 15 1006 Babar Salesman 512 14-Nov-10 4000 500 20 1007 Kashif 10 1008 Zubair President Manager Clerk 505 10 1009 Yasir 511 21-Oct-10 20000 8-Dec-09 15000 18-Dec-09 1650 10-May-09 5300 1-Jan-09 1500 15 512 700 20 1010 1011 Salman Hafeez Salesman Clerk 511 15 Perform the following queries for above table: 1. Write a query to display maximum, minimum, sum and average of salaries. 2. List all records with EName, Salary, Commission and Total Salary after commission 3. Delete the third row from the table Epm. 4. Show all records in descending order with respect to Ename. 5. How many records do we have? 6. Add Column Bonus Salary in Emp Table. 7. Write a query to find Ename whose Ename Start with 'A' and 'S'. 8. Update the EName (Emptable) as Charlie where EmpNo is 1004. 9. Write a query to find all Ename with Manager No as "505" and 512. 10. Write a query to find all Ename where Job is salesman. 11. List all 'Salesman' and add 500 to their salaries, also change the column heading to Salary With Bonus. 12. Write a query to find unique jobs from the Emp table. 13. List all employees who are either manager or salesman. 14. Show all records whose salary is more than 2000 and less than 6000. 15. write a query to find How many jobs do we have

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions

Question

What did they do? What did they say?

Answered: 1 week ago