Write a query that filters data and return the column

Assignment Help Database Management System
Reference no: EM131765547

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)

Reference no: EM131765547

Questions Cloud

Unique management structure work : Why does W. L. Gore’s unique management structure work?
What are the stages of a corporations life cycle : What are the stages of a corporation's life cycle? How can a corporation's life cycle be extended? What stage is your company in?
Compute the spending variance for catering supplies in march : The actual cost for catering supplies in March was $4,990. The spending variance for catering supplies in March would be closest to
What are the drivers of supply chain performance : What are the Drivers of Supply Chain Performance for Amazon the company?
Write a query that filters data and return the column : Create a database - Create a table in the database and Insert data into the table - Write a query that filters data and return the column
Determine comparative balance sheets of hames inc : Presented here are the comparative balance sheets of Hames, Inc., at December 31, 2017 and 2016. Sales for the year ended December 31, 2017, totaled $650,000.
Contrast push and pull promotion strategies : Compare and contrast push and pull promotion strategies and discuss the factors marketers consider when deciding which on to use.
What additional risk factors are you adding to your matrix : Now, assume that the firm wants to develop a management consultancy practice. What additional risk factors are you adding to your matrix?
What is the book value of its liability : A company has $1,000,000 bond issue outstanding with unamortized premium of $10,000 and unamortized issuance cost of $5,300. What is book value of its liability

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd