SQL Server Help

Programming
Tutor: None Selected Time limit: 3 Days

I have an assignment due and can't figure it out. Just general code to what would execute these functions would be very helpful. Write SQL DML statements that address the following requirements: Update the Employees table and give all employees making less than $10 per hour a 5% increase. List all records/fields in the EMPLOYEES table in order of the employee’s last name. List all records/fields in the EMPLOYEES table in order of the department name. List employee names, hourly pay rate and department name for employees making between (and including) $10 and $30 per hour. What is the total organization payroll assuming each employee works 40 hours per week? Using the tables you created in Unit 2’s project database (excluding the Employees and Departments tables), create one or more SQL queries to demonstrate your understanding of the following concepts: WHERE clause using comparison operators ORDER BY clause JOINS Aggregation
Nov 4th, 2013

Hi,

Here is a very nice tutorial. I you want me to write the codes for you, you will to increase the fee amount.


Good luck to you.

Nov 4th, 2013

How much to give me actual code. I would assume you would need access to the original database?

Nov 4th, 2013

Hi,

May I see the original database and I will let you know how much. Don't worry it will not be that expensive. I need the sql file.

I understand that you will needing a JOIN agregation?

Nov 4th, 2013

Here is the full script. I couldn't figure out how to send the database as a file. I hope this is just as good.

 

USE [master]


 

GO


 

/****** Object:  Database [ITCO333Database]    Script Date: 11/04/2013 01:08:10 ******/


 

CREATE DATABASE [ITCO333Database] ON  PRIMARY


 

( NAME = N'ITCO333Database', FILENAME = N'c:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\ITCO333Database.mdf' , SIZE = 2304KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )


 

LOG ON


 

( NAME = N'ITCO333Database_log', FILENAME = N'c:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\ITCO333Database_log.LDF' , SIZE = 768KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)


 

GO


 

ALTER DATABASE [ITCO333Database] SET COMPATIBILITY_LEVEL = 100


 

GO


 

IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))


 

begin


 

EXEC [ITCO333Database].[dbo].[sp_fulltext_database] @action = 'enable'


 

end


 

GO


 

ALTER DATABASE [ITCO333Database] SET ANSI_NULL_DEFAULT OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET ANSI_NULLS OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET ANSI_PADDING OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET ANSI_WARNINGS OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET ARITHABORT OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET AUTO_CLOSE ON


 

GO


 

ALTER DATABASE [ITCO333Database] SET AUTO_CREATE_STATISTICS ON


 

GO


 

ALTER DATABASE [ITCO333Database] SET AUTO_SHRINK OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET AUTO_UPDATE_STATISTICS ON


 

GO


 

ALTER DATABASE [ITCO333Database] SET CURSOR_CLOSE_ON_COMMIT OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET CURSOR_DEFAULT  GLOBAL


 

GO


 

ALTER DATABASE [ITCO333Database] SET CONCAT_NULL_YIELDS_NULL OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET NUMERIC_ROUNDABORT OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET QUOTED_IDENTIFIER OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET RECURSIVE_TRIGGERS OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET  ENABLE_BROKER


 

GO


 

ALTER DATABASE [ITCO333Database] SET AUTO_UPDATE_STATISTICS_ASYNC OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET DATE_CORRELATION_OPTIMIZATION OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET TRUSTWORTHY OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET ALLOW_SNAPSHOT_ISOLATION OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET PARAMETERIZATION SIMPLE


 

GO


 

ALTER DATABASE [ITCO333Database] SET READ_COMMITTED_SNAPSHOT OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET HONOR_BROKER_PRIORITY OFF


 

GO


 

ALTER DATABASE [ITCO333Database] SET  READ_WRITE


 

GO


 

ALTER DATABASE [ITCO333Database] SET RECOVERY SIMPLE


 

GO


 

ALTER DATABASE [ITCO333Database] SET  MULTI_USER


 

GO


 

ALTER DATABASE [ITCO333Database] SET PAGE_VERIFY CHECKSUM


 

GO


 

ALTER DATABASE [ITCO333Database] SET DB_CHAINING OFF


 

GO


 

USE [ITCO333Database]


 

GO


 

/****** Object:  Table [dbo].[DEPARTMENTS]    Script Date: 11/04/2013 01:08:11 ******/


 

SET ANSI_NULLS ON


 

GO


 

SET QUOTED_IDENTIFIER ON


 

GO


 

CREATE TABLE [dbo].[DEPARTMENTS](


 

[DEPARTMENT_ID] [int] NOT NULL,


 

[DEPARTMENT_NAME] [nvarchar](50) NULL,


 

PRIMARY KEY CLUSTERED


 

(


 

[DEPARTMENT_ID] ASC


 

)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]


 

) ON [PRIMARY]


 

GO


 

/****** Object:  Table [dbo].[Customers]    Script Date: 11/04/2013 01:08:11 ******/


 

SET ANSI_NULLS ON


 

GO


 

SET QUOTED_IDENTIFIER ON


 

GO


 

CREATE TABLE [dbo].[Customers](


 

[Customer_ID] [int] NOT NULL,


 

[Customer Name] [nvarchar](50) NULL,


 

[Customer Address] [nvarchar](50) NULL,


 

PRIMARY KEY CLUSTERED


 

(


 

[Customer_ID] ASC


 

)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]


 

) ON [PRIMARY]


 

GO


 

/****** Object:  Table [dbo].[Branch]    Script Date: 11/04/2013 01:08:11 ******/


 

SET ANSI_NULLS ON


 

GO


 

SET QUOTED_IDENTIFIER ON


 

GO


 

CREATE TABLE [dbo].[Branch](


 

[Branch_ID] [int] NOT NULL,


 

[Branch_NAME] [nvarchar](50) NULL,


 

PRIMARY KEY CLUSTERED


 

(


 

[Branch_ID] ASC


 

)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]


 

) ON [PRIMARY]


 

GO


 

/****** Object:  Table [dbo].[Books]    Script Date: 11/04/2013 01:08:11 ******/


 

SET ANSI_NULLS ON


 

GO


 

SET QUOTED_IDENTIFIER ON


 

GO


 

CREATE TABLE [dbo].[Books](


 

[Book_ID] [int] NOT NULL,


 

[Author] [nvarchar](50) NULL,


 

[Title] [nvarchar](50) NULL,


 

[Price] [decimal](18, 2) NULL,


 

[Genre] [nvarchar](50) NULL,


 

PRIMARY KEY CLUSTERED


 

(


 

[Book_ID] ASC


 

)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]


 

) ON [PRIMARY]


 

GO


 

/****** Object:  Table [dbo].[Publisher]    Script Date: 11/04/2013 01:08:11 ******/


 

SET ANSI_NULLS ON


 

GO


 

SET QUOTED_IDENTIFIER ON


 

GO


 

CREATE TABLE [dbo].[Publisher](


 

[Publisher_ID] [int] NOT NULL,


 

[Publisher Name] [nvarchar](50) NULL,


 

[Publisher Address] [nvarchar](50) NULL,


 

PRIMARY KEY CLUSTERED


 

(


 

[Publisher_ID] ASC


 

)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]


 

) ON [PRIMARY]


 

GO


 

/****** Object:  Table [dbo].[Employees]    Script Date: 11/04/2013 01:08:11 ******/


 

SET ANSI_NULLS ON


 

GO


 

SET QUOTED_IDENTIFIER ON


 

GO


 

CREATE TABLE [dbo].[Employees](


 

[Employee_ID] [int] NOT NULL,


 

[Last_Name] [nvarchar](50) NULL,


 

[First_Name] [nvarchar](50) NULL,


 

[Birth_Date] [date] NULL,


 

[Employment_Start_Date] [date] NULL,


 

[Hourly_Pay] [decimal](18, 2) NULL,


 

[Department_ID] [int] NOT NULL,


 

[Manager_ID] [int] NOT NULL,


 

PRIMARY KEY CLUSTERED


 

(


 

[Employee_ID] ASC


 

)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]


 

) ON [PRIMARY]


 

GO


 

/****** Object:  ForeignKey [FK__Employees__Depar__0519C6AF]    Script Date: 11/04/2013 01:08:11 ******/


 

ALTER TABLE [dbo].[Employees]  WITH CHECK ADD FOREIGN KEY([Department_ID])


 

REFERENCES [dbo].[DEPARTMENTS] ([DEPARTMENT_ID])


 

GO


 

Nov 4th, 2013

You still working with me?

Nov 6th, 2013

Did you know? You can earn $20 for every friend you invite to Studypool!
Click here to
Refer a Friend
...
Nov 4th, 2013
...
Nov 4th, 2013
Dec 3rd, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer