Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For the following requests, print out respectively the screenshots to show test data (the table data that you create to test each query), the query

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
For the following requests, print out respectively the screenshots to show test data (the table data that you create to test each query), the query results, and pack them into the zip file Assignment3_AccountName.zip along with your answers, then handle to the evaluator via email (XYZ@fsoft.com.vn) Barem: a - 10%,b10%,c10%,d10%,e15%,f15%,g15%,h15%, lestion: gin SQL Server and create database name EMS, run below script to generate tables: ALTER TABLE [dbo] . [Employee] ADD CONSTRAINF chk_Emai11 UNIQUE (Emai1) GO ALTER TAELE Employee ADD CONSTRAINT DE_EmpNO DEEAULT 0 FOR EmpNo GO ALTER TABLE Employee ADD CONSTRAINT DF Status DEFAULT 0 FOR Status GO CREATE TABLE [dbo] . [Ski11] ( [Sk111No] [1nt] IDENTITY (1,1) NQI NULL, [Sk111Name] [nchar] (30) COLIATE SQL_Latin1_Genera1_CP1_CI_AS NOT NULL, [Note] [nchat] (100) CoLIATE SQL_Latin1_Genera1_CP1_CI_AS NOLL ON__ ALTER TABLE Skil1 ADD CONSTRAINI PK_Ski11 PRIMARY KEY (Ski11No) GO CREATE TABLE [dbo]. [Department]/ [DeptNo] [int] IDENTITY [1,1) NOT NULL, [DeptName] [nchar] (30) COLLATE SQL_Latin1 General CP1 CI_AS NOT NULL, SQL_Latin1_General_CP1_CI_AS NULL 1 ON [PRIMARY] GO ALTER TABLE Department ADD CONSTRAINT PK_Dept PRIMARY KEY (DeptNo) GO CREATE TABLE [dbO]. [Emp_Sk111] [SKi11No] [1nt] NOT NULL, [EmpNo] [int] NOT NULL, [SkillLevel] [int] NOT NULL, [RegDate] [datetime] NOT NULL, [Description] [nchar] (100) CoLtATE SQL_Latin1 General CP1 CI_AS NDLT ) ON [PRIMARY] GO ALTER TABLE Emp_Skil1 ADD CONSTRAINT \( \overline{\text { PK_Emp SkI11 PRIMARY KEY (Ski11No, EmpNo) }} \) ALTER TABLE Employee ADD CONSTRAINT [FK_1] FOREIGN KEY ([DeptNo]) REFERENCES Department (DeptNo) GO Write SQL statements for following activities \& print out respectively the screenshots to show test data (the table data that you create to test each query) \& query results: a) Add at least 8 records into each created tables. b) Specify name, email and department name of the employees that have been working at least six months. c) Specify the names of the employees whore have either 'C++' or '.NET' skills. d) List all employee names, manager names, manager emails of those employees. e) Specify the departments which have >=2 employees, print out the list of departments' employees right after each department. f) List all name, email and skill number of the employees and sort ascending order by employee's name. g) Use SUB-QUERY technique to list out the different employees (include name, email, birthday) who are working and have multiple skills. h) Create a view to list all employees are working (include: name of employee and skill name, department name)

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

Step: 3

blur-text-image

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

Mastering Big Data Interview 751 Comprehensive Questions And Expert Answers

Authors: Mr Bhanu Pratap Mahato

1st Edition

B0CLNT3NVD, 979-8865047216

More Books

Students also viewed these Databases questions

Question

To whom do companies usually sell bonds?

Answered: 1 week ago

Question

Discuss the states of accounting

Answered: 1 week ago

Question

a neglect of quality in relationship to international competitors;

Answered: 1 week ago