Question
By using this table below I need to Write a SQL statement that creates a stored procedure with one int input parameter. The stored procedure selects the supplierId field and the total of all Count field values for each group of supplierId's from the Part table. Only rows with their Count total, or sum, greater than the value specified in the input parameter should be returned. Hint: Each returned record has a unique SupplierID value, since we are dealing with groups. I am using MS Server 2008.
Here is the table:
CREATE TABLE Part (
Partid int IDENTITY PRIMARY KEY,
Supplierid int NOT NULL
REFERENCES Part (PartID),
Description VARCHAR (25) NOT NULL,
Count int NOT NULL,
Class VARCHAR (5) NOT NULL,
Inspection smalldatetime NOT NULL);
Here is the table:
CREATE TABLE Part (
Partid int IDENTITY PRIMARY KEY,
Supplierid int NOT NULL
REFERENCES Part (PartID),
Description VARCHAR (25) NOT NULL,
Count int NOT NULL,
Class VARCHAR (5) NOT NULL,
Inspection smalldatetime NOT NULL);
Answers
You need to indicate what SUBJECT this is -- math, science, computer programming, what?
Related Questions
1- A SQL statement is needed to create a stored procedure that has one input parameter of data type...
A SQL statement is needed to create a stored procedure, which adds a new record to the Part table of...
Two magnets are placed on a table, and they immediately move to attach to each other. Which statemen...
Two magnets are placed on a table, and they immediately move to
attach to each other. Which stateme...