Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Assignment:

Exercise Details

Define the terms

1. Subquery
2. Subquery search condition
3. Four ways to introduce a subquery in a SELECT statement
4. Correlated subquery
5. INTO

Exercise 1

1. Watch the following T-SQL video:

Introduction to Transact SQL (T-SQL) using Microsoft SQL Server by Steve Fox (youtube)

2. Complete the T-SQL Tutorial, Lesson1: Creating Database Objects. Select SQL Server 2012 from the "Other Versions" dropdown menu (See Figure 1).

3. After watching the T-SQL video and going through the tutorial, do the following(include screenshots for each):

1. Create a database

2. Create a table in the database

3. Insert data into the table

4. Update the data

Exercise 2

1. Write a query that filters data and return the column "Name" from table Production.Product. The filtering of rows is achieved by a WHERE clause that compares a single value from a subquery.

2. The inner subquery shall return a specific ProductSubcategoryID that the outer query uses as a filter of products to include in the report. The inner query will use its own WHERE clause to deliver its value, the ProductSubcategoryID, by retrieving it where the column "Name" in table Production.ProductSubcategory have the value of ‘Saddles'.

The result set should look similar to the following: Name
LL Mountain Seat/Saddle
ML Mountain Seat/Saddle
(9 row(s) affected)

Exercise 3 In this exercise, you can change the previous query to deliver the following result set. The WHERE clause in the subquery will now use the wildcard string ‘Bo%' for a comparison.

The result set should look like the following.

Name

Water Bottle - 30 oz.

LL Bottom Bracket

ML Bottom Bracket

(6 row(s) affected)

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M92574230

Have any Question?


Related Questions in DBMS

The groceries datasetimagine 10000 receipts sitting on your

The groceries Dataset Imagine 10000 receipts sitting on your table. Each receipt represents a transaction with items that were purchased. The receipt is a representation of stuff that went into a customer's basket. That ...

You are in a real estate business renting apartments to

You are in a real estate business renting apartments to customers. Your job is to define an appropriate schema using SQL DDL in MySQL. The relations are Property(Id, Address, NumberOfUnits), Unit(ApartmentNumber, Propert ...

Question create an erd for the following scenario once you

Question: Create an ERD for the following scenario. Once you submit you will get access to the correct way to create the ERD. Please watch the video and correct any errors in your submission and resubmit. A small company ...

Question talk about the importance of pulling data from

Question : Talk about the importance of pulling data from worksheets into a single sheet also the ways excel could be a solution to a complex challenge. The response must be typed, single spaced, must be in times new rom ...

Sqlwrite a select statement that returns three columns from

SQL Write a SELECT statement that returns three columns from the Vendors table: VendorContactFName, VendorContactLName, and VendorName. Sort the result set by last name, then by first name.

Case study problem 1 the case study company has experienced

Case Study: Problem 1 The case study company has experienced rapid growth in both the size of its client base and also in the services provided to clients. Unfortunately, the growth in data management policies, procedure ...

Question 1 what isdata-manipulation language dml there are

Question: 1. What isData-Manipulation Language (DML)? There are four types of access in DML, explain each one. 2. Assume we have a Library Database consists of the following relations: author(author_id, first_name, last_ ...

Assignmenta restaurant is designing a database to keep

Assignment A restaurant is designing a database to keep track of customer services. A customer is defined as a customer ID, name, address and a telephone number. Customers are served by employees. Each employee is define ...

Sql assignmentin these exercises youll enter and run your

SQL Assignment In these exercises, you'll enter and run your own SELECT statements. You will use the MyGuitarShop database for these queries. If you do not already have the MyGuitarShop database, the SQL script and the i ...

Assignment -scenario setup a mock phase 3 clinical trial

Assignment - Scenario: Setup a Mock Phase 3 Clinical Trial for evaluating the efficacy of a Blood Pressure/Weight Loss/ or Muscle Strength Enhancement supplement. Assume that the testing takes place at a physician's offi ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As