Question: Write the SQL query for the following: Q1 This question asks you to write the code ( SQL-Server) to do the following (label your answers
Write the SQL query for the following:

Q1 This question asks you to write the code ( SQL-Server) to do the following (label your answers using these numbers) 1. Create a database using your name 2. Create a single table using the parameters below 3. Insert the given data 4a. Show a result of retrieving the ids and names from the table 4b. Show a single result summary query that retrieves the count of the number of rows and label this as 'RowCount' and the maximum of the status, and label that column 'MaxStatus' 4c. Produce a single result that returns id, name and all locations that start with P. The details for questions Q1 (use the above numbers to label your answers) Write the SQL server code to create a database and use that in subsequent questions Write the code to create a table named Supplierxx where xxx is to be replaced with your initials.e.g., my table would be SupplierRR Column parameters: id of type integer, no nulls allowed, primary key name is to be with 10 maximum characters, no nulls allowed status is to be of type integer, not null and with a default of zero location is to be of type with 10 maximum character, no nulls there is a constraint on the location column that the city must be one of two {Phx, Tucson) Note: be careful of SQL reserved words 3. The accompanying Tuple Data Set 10 20 30 40 ABC DEF XXT ZZT 12 15 12 13 Phx Phx Tucson Phx
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
