We may earn an affiliate commission when you visit our partners.
Course image
Dave Merton

This is an in depth course about using and programming with SQL Server. It assumes that the student has at least a rudimentary understanding of database concepts and architecture and gets right into the meat of the subject.

This course will get you up to speed on executing queries. The final part of the course briefly touches on stored procedures and user defined functions.

Enroll now

Here's a deal for you

We found an offer that may be relevant to this course.
Save money when you learn. All coupon codes, vouchers, and discounts are applied automatically unless otherwise noted.

What's inside

Learning objectives

  • Learn how to insert, delete, update and query from tables
  • Learn about many of the useful built in t-sql functions (sum, cnt, avg...)
  • Learn about temp tables and table variables
  • Learn about the power of stored procedures

Syllabus

Queries - Part 1 - SELECT Records
Course Description
* * SECTION DESCRIPTION * *
SELECT *
Read more
SELECT COUNT(*)
SELECT DISTINCT
SELECT ISNULL()
SELECT SUM()
SELECT MAX()
SELECT MIN()
SELECT MAX() and MIN() Example
SELECT AVG()
SELECT MAX(), MIN() and AVG() Example
Concatenation Example
SELECT CASE Example
SELECT CASE and Concatenation Example
SECTION 1 - REVIEW QUIZ
Queries - Part 2 - FROM Clause
FROM - NO JOIN
FROM - INNER JOIN
FROM - LEFT JOIN
FROM - LEFT vs INNER
FROM - LEFT vs RIGHT
FROM - INNER JOIN with Temp Table
FROM - INNER JOIN with Table Variable
UNION QUERY - TSQL Command Line
SECTION 2 - REVIEW QUIZ
Queries - Part 3 - WHERE Clause
WHERE X = Y
WHERE X > Y
WHERE X IN (a,b,c,d)
WHERE X NOT IN (a,b,c,d)
WHERE X BETWEEN ...
WHERE X IN (SELECT ...)
WHERE X NOT IN (SELECT ...)
WHERE - IN Clause vs Sub Query
WHERE - AND Operator
WHERE - OR Operator
WHERE - AND Operator, OR Operator and Parentheses
SECTION 3 - REVIEW QUIZ
Queries - Part 4 - ORDER BY Clause
ORDER BY 1, 2
ORDER BY 1, 2 (Possible Issues)
ORDER BY ,

This video will discuss the importance of being familiar with ASCII values and how htis ties in with the ORDER BY Clause.


You really need to watch this video along with the next video, about COLATION to get the entire message.

This video will discuss the importance of being familiar with "COLATION" and how this ties in with the ORDER BY Clause.


You really need to watch this video along with the previous video, about ASCII values to get the entire message.

ORDER BY - ASC
ORDER BY - DESC
ORDER BY CASE - Part 1

In this video we continue on with a strange ordering request: "Put NY first, then all other states in order." This video shows a specific approach that works but is more complicated than what is necessary.

ORDER BY CASE - Part 3
ORDER BY (SELECT ...)
SECTION 4 - REVIEW QUIZ
Queries - Part 5- GROUP BY Clause
GROUP BY - MIN() & MAX() - Part 1
GROUP BY - MIN() & MAX() - Part 2
GROUP BY - MIN() & MAX() - Part 3
GROUP BY - COUNT(*)
GROUP BY - SUM()
GROUP BY - AVG()
GROUP BY - HAVING CLAUSE - Part 1

GROUP BY - HAVING CLAUSE  - Part 2

GROUP BY - HAVING CLAUSE - Part 3
SECTION 5 - REVIEW QUIZ
A Quick Look at the value of STORED PROCEDURES

xxx

STORED PROCEDURES - EXAMPLE 1 - Part 2
STORED PROCEDURES - EXAMPLE 1 - Part 3

VIDEO - The video will show you how to write to a text file from SQL Server.

The following notes are references to the additional support files that are connected with this section. These files are downloadable so that you can copy and paste the code right into SSMS / T-SQL.

01 - CREATE PROCEDURE Write To File - This is the TSQL code to create your own [WriteToFile] STORED PROCEDURE.*

02 - Write To Text File - Command Line SQL - This is an example of how to EXECUTE the [WriteToFile] STORED PROCEDURE.*

03 - Write To Text File Command Line SQL - With Parameters - This is an example of how to EXECUTE the [WriteToFile] STORED PROCEDURE - with Parameters/Variables/Arguments.*

04 - Write To Text File Command Line SQL - With Parameters And Date In Filename - This is an example of how to execute the [WriteToFile] STORED PROCEDURE - with Parameters/Variables/Arguments and INSERTING a FORMATTED DATE-TIME STAMP into the file name.*

Ole Automation SQL - This is the code that you will need to run to initially turn on the OLE AUTOMATION Permissions in SQL SERVER.*

* This T-SQL code can be copied into the SSMS command line environment.

A Quick Look at the value of USER DEFINED FUNCTIONS
** SECTION DESCRIPTION **
USER DEFINED FUNCTIONS - EXAMPLE 1 - FormatCustName()

VIDEO- The video will show you how to make use of a User Defined Function. In this particular example the function will return a value that has been formatted with n instances of a specific text character.

The following notes are references to the additional support files that are connected with this section. These files are downloadable so that you can copy and paste the code right into SSMS / T-SQL.

01 - CREATE FUNCTION – dbo.PrePad() Example- This is the TSQL code to create your own dbo.[PrePad]USER DEFINED FUNCTION.*

02 – USER DEFINED FUNCTION – dbo.PrePad() Example- This is an example of how toCALL / USE the dbo.[PrePad]USER DEFINED FUNCTION.*

* This T-SQL code can be copied into the SSMS command line environment.

USER DEFINED FUNCTIONS - EXAMPLE 2 - Part 2 - PrePad() Function

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Suited for learners with some grounding in SQL principles and architecture
Provides a thorough understanding of querying, stored procedures, and user-defined functions in SQL Server
Useful for industry professionals seeking to enhance their SQL skills
Instructor Dave Merton possesses extensive experience in SQL Server
Course content aligns with industry standards and practices
In-depth exploration of SQL Server's functionality

Save this course

Save Learn SQL Queries to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Learn SQL Queries with these activities:
Review SQL language fundamentals
Refresh your understanding of the core concepts of SQL, ensuring a strong foundation for the course.
Browse courses on SQL
Show steps
  • Review the syntax and structure of SELECT statements
  • Practice writing queries to retrieve data from tables
  • Refresh your knowledge of data types and operators
Read 'SQL Queries for Mere Mortals'
Gain insights into practical SQL querying techniques and best practices from an accessible and informative book.
Show steps
  • Read through the chapters and work on the practice exercises
  • Refer back to the book as needed for clarification and reference
  • Apply the techniques learned to your own SQL projects
Show all two activities

Career center

Learners who complete Learn SQL Queries will develop knowledge and skills that may be useful to these careers:
Database Programmer
Database Programmers design, develop, and maintain database systems. This course provides a strong foundation in SQL Server programming, which is essential for database programmers to effectively design and implement database solutions. By understanding the concepts of data modeling, query optimization, and database administration, learners can develop the skills necessary to succeed in this role.
Database Administrator
Database Administrators oversee the management and maintenance of database management systems, ensuring optimal database performance and security. This course provides a strong foundation in SQL Server programming, which is essential for database administrators to effectively manage and query databases. By understanding the concepts of data manipulation, retrieval, and management, learners can develop the skills necessary to succeed in this role.
Data Warehouse Architect
Data Warehouse Architects design, develop, and maintain data warehouse systems. This course provides a strong foundation in SQL Server programming, which is essential for data warehouse architects to effectively design and implement data warehouse solutions. By understanding the concepts of data modeling, data integration, and data analysis, learners can develop the skills necessary to succeed in this role.
Business Intelligence Developer
Business Intelligence Developers design, develop, and maintain business intelligence solutions. This course provides a strong foundation in SQL Server programming, which is essential for business intelligence developers to effectively develop and implement business intelligence solutions. By understanding the concepts of data analysis, data visualization, and data reporting, learners can develop the skills necessary to succeed in this role.
Data Analyst
Data Analysts collect, analyze, and interpret data to provide insights and make informed decisions. This course helps build a foundation in SQL Server programming, which is essential for data analysts to effectively query and manipulate data. By learning about data retrieval, aggregation, and manipulation, learners can develop the skills necessary to succeed in this role.
Machine Learning Engineer
Machine Learning Engineers design, develop, and maintain machine learning models. This course provides a strong foundation in SQL Server programming, which is essential for machine learning engineers to effectively query and manipulate data. By understanding the concepts of data analysis, data mining, and machine learning, learners can develop the skills necessary to succeed in this role.
ETL Developer
ETL Developers design, develop, and maintain data integration processes. This course provides a strong foundation in SQL Server programming, which is essential for ETL developers to effectively extract, transform, and load data. By understanding the concepts of data integration, data transformation, and data quality, learners can develop the skills necessary to succeed in this role.
Data Scientist
Data Scientists use scientific methods, processes, algorithms, and systems to extract knowledge and insights from data. This course provides a foundation in SQL Server programming, which is essential for data scientists to effectively query and manipulate data. By understanding the concepts of data retrieval, aggregation, manipulation, and analysis, learners can develop the skills necessary to succeed in this role.
Business Intelligence Analyst
Business Intelligence Analysts use data analysis techniques to translate raw data into actionable insights for businesses. This course provides a foundation in SQL Server programming, which is essential for business intelligence analysts to effectively query and manipulate data. By learning about data retrieval, aggregation, manipulation, and analysis, learners can develop the skills necessary to succeed in this role.
Software Engineer
Software Engineers design, develop, and maintain software systems. This course provides a foundation in SQL Server programming, which may be useful for software engineers who work with databases. By understanding the concepts of data retrieval, manipulation, and management, learners can develop the skills necessary to integrate databases into their software applications.
Web Developer
Web Developers design and develop websites and web applications. This course provides a foundation in SQL Server programming, which may be useful for web developers who work with databases. By understanding the concepts of data retrieval, manipulation, and management, learners can develop the skills necessary to integrate databases into their web applications.
Information Security Analyst
Information Security Analysts plan and implement security measures to protect an organization's information systems. This course provides a foundation in SQL Server programming, which may be useful for information security analysts who work with databases. By understanding the concepts of data retrieval, manipulation, and management, learners can develop the skills necessary to secure databases from unauthorized access.
IT Auditor
IT Auditors assess and evaluate an organization's IT systems and practices to ensure compliance with regulations and standards. This course provides a foundation in SQL Server programming, which may be useful for IT auditors who work with databases. By understanding the concepts of data retrieval, manipulation, and management, learners can develop the skills necessary to audit databases for compliance.
Data Entry Clerk
Data Entry Clerks input and maintain data in computer systems. This course provides a foundation in SQL Server programming, which may be useful for data entry clerks who work with databases. By understanding the concepts of data manipulation and management, learners can develop the skills necessary to enter and maintain data accurately and efficiently.

Reading list

We've selected six books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Learn SQL Queries.
Provides a comprehensive overview of T-SQL, the Transact-SQL programming language used in SQL Server. While not specifically focused on SQL Server, this book provides a solid foundation in T-SQL concepts that are applicable to any SQL database.
Tuning SQL queries critical skill for database administrators and developers. provides a comprehensive guide to query tuning techniques, which can help students improve the performance of their SQL queries.
Provides a comprehensive guide to query tuning techniques for SQL Server 2016. While not directly covered in the course, this book valuable resource for anyone who wants to optimize their SQL queries.
Provides a deep dive into execution plans, which are essential for understanding how SQL queries are optimized and executed. While not directly covered in the course, this book valuable resource for anyone who wants to optimize their SQL queries.
Provides a comprehensive overview of database systems, including SQL. While not specifically focused on SQL Server, this book provides a solid foundation in database concepts that are applicable to any SQL database.
Provides a quick and easy introduction to SQL. It useful resource for students who are new to SQL or who need a refresher on the basics.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to Learn SQL Queries.
Capturing Logic with Stored Procedures in T-SQL
Most relevant
EssentialSQL: Stored Procedures Unpacked - Code in TSQL
Most relevant
Working with SQL Stored Procedures using MySQL Workbench
Most relevant
Programming SQL Server Database Stored Procedures
Most relevant
SQL Concepts for Data Engineers
Most relevant
Automating Data Cleansing in SQL Server
Most relevant
Database Applications with JDBC in Java SE Applications...
Most relevant
Optimizing SQL Server Procedures: Best Practices and...
Most relevant
Integrating Functions and Procedures in SQL Server...
Most relevant
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser