MRRisley:=("A Guide to Learning T-SQL")

Note: This guide is adapted from Itzik Ben-Gan's T-SQL Fundamentals, 3rd edition. It is meant to be a companion to his work, offering alternative descriptions and examples.
Github Icon with Link
Course Navigation

This guide is used to teach a graduate-level course at the University of Cincinnati and is for education purposes only. The course week-by-week curriculum and syllabus is listed below:

Current Course Syllabus

Week 1
Week 2
Week 3
Week 4
Week 5
SQL Site Navigation

A. SQL Server Setup

  1. Setting Up SQL Server on Local PC
  2. This section is a step-by-step guide to installing SQL Server, setting up a local server instance, and installing the AdventureWorks databases. This option is appropriate if you own a Windows PC.

  3. Connecting to SQL Server on UC PC
  4. This section is a step-by-step guide to setting up SQL Server on a UC computer. This option is appropriate if you are at a UC lab or connect to a Virtual Lab. This option will also work on your own PC.

  5. UC Virtual Desktop AdventureWorks Setup Step-by-Step Video
  6. This is a video to install the AdventureWorks Database on a UC virtual desktop. This is the fastest and easiest way I know so far.

B. Intro to SQL

This section is a very high-level overview of SQL. This content is covered during Week 1.

C. The SQL Query

This section introduces the fundamentals of the SQL query. This content is covered during Week 2.

D. SQL Data Types

This section introduces the various data types in T-SQL, including number, character, and date types. This section also introduces functions that are useful for working with data. This content is covered during Week 3.

E. SQL Operators

This section introduces operators in T-SQL, including mathematic, comparison, and logic operators. This content is covered during Week 3.

F. CASE Expressions

This SQL file teaches the basics of the CASE expression. This content is covered during Week 4.

G. UNION

This SQL file teaches the basics of the UNION in T-SQL, which joins rows from two or more queries for the same fields. This content is covered during Week 4.

H. JOIN

This SQL file teaches the basics of the JOIN in T-SQL, which joins fields from two or more tables for the same primary key (such as an account number). This content is covered during Week 4.

I. Duplicate keys in a JOIN

This SQL file demonstrates what a JOIN will return when duplicate primary keys exist in one or more of the tables.

J. nested SELECT

This SQL file introduces the concept of nested SELECT, which allows you to create queries within queries.

K. Creating Tables

This SQL file demonstrates how to create and manipulate tables in T-SQL, including the very useful temporary, or "temp," table.

L. Importing Excel and Flat-file Data into SQL

  • You need to determine whether office is 32-bit or 64-bit. Click here for YouTube video.
  • Click here for YouTube video on importing an Excel Workbook.
  • Click here for YouTube video on importing via a .CSV or tab-delimited .TXT file.

M. SQL and R

  • To use R and SQL together, you need to install your SQL Server instance in the Windows "Data Sources (ODBC)" program. The YouTube video is here.
  • If you need to download R, here is one of the mirror sites to download it.
  • R Script

N. SQL and Excel Power Pivot

The YouTube video is here.

O. SQL and Tableau

Tableau Doc

Github Icon with Link
Back to MRRisley Home