
This lecture takes you through how to download and install the SQL Server Express Edition software from Microsoft.
The SQL Express software is a compact database engine that we can use to store data and run SQL queries.
You can download the software at:
https://www.microsoft.com/en-gb/sql-server/sql-server-downloads
after completing the lecture you will have the database engine software on your computer ready to run through the rest of the course, and will be able to use it for your own projects.
SQL server management studio (SSMS) is a fully featured application that lets you administer and manage the databases server, as well as a tool to write and test queries.
This lecture will take you through how to download the software and then how to install it on your computer.
Download the SQL Server Management Studio software at:
https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms
once installed you will be able to write SQL queries against any Microsoft SQL server database.
to run the queries in the course we're going to need some data to work with. the AdventureWorks database backup file contains lots of data we can use to experiment with.
you have the choice to either download and restore the full AdventureWorks sample database from the Microsoft site, or to run a script file and create the database and a smaller amount of data from a file in the course.
Download the AdventureWorks backup file at:
https://docs.microsoft.com/en-us/sql/samples/adventureworks-install-configure
in this video we will restore the AdventureWorks backup file onto your version of SQL server.
after completing the process we'll have a full install of the sample database ready to use for the rest of the course, and for your own tests.
if you prefer to install using the provided script then this lecture will take you through the quick process of using a script file to create the database and add tables and data.
this lecture outlines the process of connecting to a database and introduces you to the structure of SQL server.
continuing on from the previous lecture, we go through the rest of the management studio.
we go through the menus and shortcuts, navigating through the serve objects using the object explorer treeview pane, and walk through the particulars of the detail pane.
The SELECT clause defines the columns we get back in our results from the server.
this lecture shows how to use the SELECT clause with some text and numeric values to return a table of results.
The select clause defines the fields you want to return in your table, this can be static fields such as a string of characters or a fixed number, a field from one or more tables, or functions that combine the two or generate new fields based on existing data or calculations.
The FROM clause shows SQL server what table we want to use to bring back our results.
The FROM clause is where you specify what tables from your database you would like SQL to get rows from. You can also use the Inner, left or outer joins to join tables together based on matching up the fields inside each table.
You can use different operators against columns in your tables to filter out the rows you don’t want, this will reduce the number of rows that are sent over the network from your server, and the amount of data that needs to be processed by the application.
Use equals to filter a field to exactly one value, not-equals to filter everything that isn't a particular value, BETWEEN to filter everything between two values, IN to filter to a list of values, and LIKE to filter values that match a specific pattern.
this lecture details the nuances of the dates datatype, how to use it in WHERE clauses, and how the database system stores the values
this lecture clarifies the features of the NULL values in database tables, how to use them in queries and how to use the special functions.
The order by clause lets you sort the results of your queries, you can use it to order one or more columns, or even order by functions and formula results.
The order by clause should be the last clause in your select statement, remember that SQL server orders the results of the whole query rather than trying to do any ordering work before the complete set of results have been decided.
the GROUP BY Clause tells SQL server that you would like it to combine rows where the column values are the same as each other. With this clause in place, you can also use aggregate functions such as SUM or Count to perform calculations against your grouped rows.
The group by clause sits before our order by in our Select statement, and has contents similar to the SELECT clause, meaning you can group by column names, or functions
Use the having clause along with an aggregate function to limit to only the rows where the result of the aggregate is a certain value.
You can use any operator normally used in the WHERE clause in the having clause to evaluate the result.
this video gives you a full overview of the whole course to refresh your memory.
the final test answers are presented here, along with detailed descriptions of how to best answer them.
SQL Server SELECT query foundations aims to teach you the basics of retrieving data from the Microsoft SQL server database engine.
the course contains details on how to use the SELECT clause in the SQL server environment to query database tables and bring back data to present in reports or applications
This course is aimed at anyone looking to improve their understanding of database development, from data analysts looking to increase their skills on data querying, programmers looking to add database capabilities to their apps, or anyone who needs to get at the wealth of data contained in their companies' database servers.
the course includes lessons on :
Retrieving and combining columns from SQL server tables using the SELECT clause to define columns and functions to display to the end users.
Joining multiple tables in different ways to combine information. Using the FROM clause to specify which tables you want to connect to, and multiple JOIN clauses to connect tables to each other.
Filtering data to retrieve only the information you want. Using the WHERE clause to filter your data on one or multiple columns, and the ways to combine the WHERE clause with JOINs on your tables to efficiently retrieve information.
Using aggregate functions to GROUP BY information and find totals and averages of data to perform analysis and make reports
the course contains lessons on how to download and install all the tools you need to become proficient in coding SQL; I'll take you through how you can download and install SQL server express edition, a free personal use version of SQL server, and the sample 'AdventureWorks' database so you can try out all the examples, and develop and test your own queries.
We'll also download SQL Server Management Studio; your best interface into the database environment, and I'll go through the basics of how to connect to Databases, and how to use the tool more efficiently.
I've included handouts with summaries and further information on some topics, as well as increasingly difficult review questions for you to try yourself. each set of questions is followed by a video analysis of the solutions and the different ways you could choose to solve them.
There's also an end of course test that combines all the techniques you've learned into one final exam.