SQL Query

10 pts.
Tags:
SQL
SQL Server
SQL Server Query

Employee:

EmpID

Name

Company

MGR_ID

Date_of_Joining

1

Bhaskar

A3

3

1-Jan-13

2

Ujin

A1

3

1-Jan-13

3

Rex

A6

NULL

1-Jan-13

Model:

ID

Model_Name

Company

Model_Type

Harddisk

OS

RAM

1

750

Dell

PC

600 GB

WIN 7

4 GB

2

650

HP

LAPTOP

400 GB

WIN 7

6 GB

3

350

DELL

LAPTOP

300 GB

WIN 7

4 GB

System:

ASSET_ID

UNIQUE_ASSET_ID

MODEL_ID

STATUS

DATE_OF_PURCHASE

1

XXX01

1

A

1-JAN-13

2

XXX02

1

A

1-JAN-13

3

XXX03

2

A

1-JAN-13

4

XXX04

2

A

1-JAN-13

5

XXX05

2

N

1-JAN-13

Allocation:

EMP_ID

ASSEST_ID

DATE_OF_ASSIGNMENT

DATE_OF_RELIEVING

1

1

1-JAN-13

31-12-9999

1

2

2-JAN-13

31-12-9999

2

3

3-JAN-13

31-12-9999

3

4

1-JAN-13

31-12-9999

SQL:

1) Display employee name along with his manager name where employee and his manager had joined on the same day.

2) List down the model name along with company name for which contains maximum systems.

3) List down the employee and its system configuration for the employees who is having more than 1 system assigned.

4) List down the system and its configuration which got assigned to multiple employees.

5) Write an query to display following output

Model Name

PC-ACTIVE

PC-NOT ACTIVE

LAP-ACTIVE

LAP-NON ACTIVE

DELL

4

5

1

1

Please help on this



Software/Hardware used:
Software

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Welcome to ITKE. Help how? Please describe any problem you are actually having and show any work leading to the problem. It appears to be an academic assignment, and we can't give direct answers to academic questions. We can, however, give guidance and discuss work that you show to us. -- Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following