0% found this document useful (0 votes)
36 views

Basic Queries

The document contains instructions for Professor Egon Engelbert to run SQL queries on the AdventureWorks database and Sales tables. Students are asked to: 1) Run two SELECT queries on the Sales.Store and Sales.CreditCard tables and export the results to Excel. 2) Create a Word document answering four questions about the data in the tables by running additional queries. The questions ask about record counts, column contents, and filtering for specific credit card types.

Uploaded by

Harlens Exume
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Basic Queries

The document contains instructions for Professor Egon Engelbert to run SQL queries on the AdventureWorks database and Sales tables. Students are asked to: 1) Run two SELECT queries on the Sales.Store and Sales.CreditCard tables and export the results to Excel. 2) Create a Word document answering four questions about the data in the tables by running additional queries. The questions ask about record counts, column contents, and filtering for specific credit card types.

Uploaded by

Harlens Exume
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

February 26, 2019

Professor Egon Engelbert


Basic Queries

Part 1
After installing Microsoft SQL Server Developer Edition and the AdventureWorks and Scripts
for SQL Server CTP3, run the following queries using AdventureWorksCTP3. Please note that
when SQL queries are run, results are generated in the form of data. This data should be exported
and saved to an Excel file for a visual check of accuracy.
1. Select * from Sales.Store;

2. Select * from Sales.CreditCard;


Part 2
Create a Word document that includes the SQL queries used to explore the database tables and
answer the following questions using the queries completed in Steps 1 and 2 above. Make sure to
provide a screenshot for each answer to every question.
1. How many records are in the Sales.Store table?
ASW- 700 Records (701 rows- the column name(1))
2. What kind of information is contained in the Sales.Store table (i.e. employee
demographics, customer information, facility information, etc.)? What columns are
contained on the Sales.Store table?
ASW-
a) In the Sales.Store table there is information about the demographics link of the stores
listed with the store name, their business ID in the database, their sales person ID,
rowguid and the last time the demographics where modified for each stores.
b) In the Sales.Store table there is: BussinessEntityID, Name, SalesPersonID,
Demographics, rowguid, ModifiedDate
3. What is the Expiration year of Credit Card ID #13?
ASW- 2005
4. In the CreditCard table, how would you expand the second query to determine all the
cards of type "SuperiorCard"?
ASW-
Select * from Sales.CreditCard
where CardType = 'SuperiorCard';

You might also like