Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Comprehensive Assignment 2 SQL Queries In this assignment, you are going to create SQL queries. Queries allow us to ask questions from our database. This

Comprehensive Assignment 2 SQL Queries In this assignment, you are going to create SQL queries. Queries allow us to ask questions from our database. This allows us to extract useful information from the database. Understanding how to create useful queries will allow you to get more from your database. The following is going to be used to create an example database (this is for you to build in your mind a database table): CREATE TABLE shop ( article INT UNSIGNED DEFAULT '0000' NOT NULL, dealer CHAR(20) DEFAULT '' NOT NULL, price DECIMAL(16,2) DEFAULT '0.00' NOT NULL, PRIMARY KEY(article, dealer)); INSERT INTO shop VALUES (1,'A',3.45),(1,'B',3.99),(2,'A',10.99),(3,'B',1.45), (3,'C',1.69),(3,'D',1.25),(4,'D',19.95); Answer the following questions: 1) How many fields are being created in this table? 2) Identify the primary key fields. 3) How many records are in the table? 4) What does the INSERT INTO statement do? 5) In this question, we want to know what is the highest item number? Create a query that extracts the highest number using the maximum. 6) Create a query that lists all of the records with dealer records matching A. 7) Create a query that lists all of the records with price between 3 and 4 dollars. 8) Create a query that lists all of the records with the article value of 3 and 4. 9) Create a query that lists all of the records with a price of less than 2.50 and dealer value of B. 10) Create a query that adds a new set of records of with the following: (1,E,5.99) (2,F,7.88)

Assignment Rubric: Questions 1,2,3,4 are worth 12.5 points each Questions 5 9 are worth 15 points each o Question 10 is worth 10 points Please submit the assignment in a Microsoft Word document called Comprehensive_Assignment_2.docx.

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

Students also viewed these Databases questions