Duration: 20:26 min
Summary: In this video, we will continue the select statement discussion. When we left of in the previous video, we were talking about the ‘top’ statement. We saw how we can retrieve the top ‘x’ rows from a table. Today, we will add to that by discussing the use of the ‘percent’ keyword. That will help us determine which ‘%’ of the table to return (i.e. 2%, 5%...). After that, we will talk about the use of ‘with ties’ when using ‘top’ and what effect it will have on the result. We will also discuss the use of comments (single line and multi-line comments). SQL Server has easy buttons to comment/uncomment code. Finally, we will build a statement that contains most of the clauses: we will see how to select from a table using where clause, aggregate functions (Sum), group by clause, order by clause, and the having clause.
Technologies and Resources: T-SQL, SQL Server 2012 Express, AdventureWorks 2012, Database, Schema.