19.1. SQL Part 1 - Introduction and Azure Data Studio

19.1.1. Readings

Read the following articles, follow along where instructed:

What is SQL?

What Is a Database?

Learn to write SQL queries in 5 minutes!

Learn to write basic SQL Queries.

Read the following article, skipping the installation and set up section and stopping at the Join section. We are just looking for comprehension to help guide when completing the exercises. As they are using SQLite, some of the terminology may be slightly different. We are using T-SQL which uses TOP instead of LIMIT.

note

As you read through the articles in the SQL lessons, you may find that you want to try out the queries the authors describe. You have access to a database called AdventureWorks2019 if you would like to try out some of these queries. Doing so is additional practice separate from the exercises.

Additional Resources

19.1.2. Check Your Understanding

Question

What does SQL stand for?

Question

Why do we use SQL?

Question

Is Microsoft Excel a database?

  1. True
  2. False

Question

How are a Relational Database’s items structured?

Question

What does the asterisk(*) return?

Question

Match the following terms:

Table Command which is used to retrieve the desired information.
Row Collection of data.
Column Known as a tuple/record.
Query Represents a unique field.

Question

Match the following Keyword with its definition:

WHERE Filters the data that falls into the defined begin and end value.
SELECT Sort the data according to the specified column.
FROM Filter the data according to specified conditions.
BETWEEN Used to eliminate duplicate data from the specified columns.
ORDER BY Used to retrieve data from the data table.
DISTINCT Specify the table name to retrieve data from.

Question

What does the Keyword AS do?

Question

In T-SQL what expression would return the first 50 rows?