Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need SQL Command from Question 2 I have the table and previous functions. [member (memberNo, lname, fname, dept, desig, joiningDate, salary, rating, locationCode) also DOB,

Need SQL Command from Question 2 I have the table and previous functions.

[member (memberNo, lname, fname, dept, desig, joiningDate, salary, rating, locationCode) also DOB, commission and GossSalary

location (locationCode, address, city, phone, yearOfOpening)

Please note the code for rating as 1 = Full time employee 2 = Contract employee 3 = Visiting employee 3.] - Already have - attach in the screenshot

2. Add two columns Manager (same as memberID) and managerSince (date) in location table

3 Modify three tuples of the location table to add manager code and managerSince date in location table

4. Now run the queries:

a. List the details of all the managers who are listed in location table

b. List all the managers who are working as manager for more than 2 years

c. List a manager who is working as a manager at the same location ever since he has joined. Please answer all these quries and new function SQL Commands ( SQL Developer Code).

Here pic of tabels code - i created :

Please provide in SQL developer. image text in transcribed

Branch = Location table are same. Different names.

Create table location location Code NUMBER NOT NULL, address VARCHAR2(255) NOT NULL, city VARCHAR2(255) NOT NULL, phone NUMBER NOT NULL, yearOfOpening NUMBER NOT NULL, CONSTRAINT location_PK PRIMARY KEY(location Code) ); Create table member memberNo NUMBER NOT NULL, Iname VARCHAR2(255) NOT NULL, fname VARCHAR2(255), dept VARCHAR2(255) NOT NULL, desig VARCHAR2(255) NOT NULL, joiningDate date NOT NULL, salary decimal(10,2) rating number NOT NULL, locationCode NUMBER NOT NULL CONSTRAINT member_PK PRIMARY KEY(memberno), CONSTRAINT member_FK1 FOREIGN KEY(location Code) REFERENCES location(location Code) )

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

In Exercises find the sum of the convergent series. n=1 4 n(n + 2)

Answered: 1 week ago