Chapter 9: Introduction to SQL

In This Chapter

  • Starting off with SQL basics
  • Going further with advanced SQL concepts

Standard Query Language (SQL) is an industry-standard, fourth-generation programming language designed for working with databases. Most database vendors, including SQL Server, have adopted this language into their implementations, making it easier for data analysts to work on different platforms.

You'll use SQL on a frequent basis. A lot of times that occurs through a reporting interface that translates your requests into SQL. This makes it important for you to at least learn the basics of SQL. Understanding SQL allows you to go beyond the canned reports available to you and develop your own queries directly against the various databases that may exist in your organization.

SQL Basics

Learning SQL is easy after you understand the basic structure of the language. In this section we cover the SQL statements that allow you to retrieve data and then group and filter it.

The Select statement

At its core, SQL revolves around the Select statement. This statement enables you to retrieve records from a database table. The basic syntax of a Select statement is:

Select ‘Hello World’

To see the Select statement in action, open a Query window in Microsoft SQL Server Management Studio with the AdventureWorkdsDW database loaded and run the Hello World statement.

note.eps Use a single ...

Get Microsoft Business Intelligence Tools for Excel Analysts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.