SPECIAL OFFER: ITIL® 4 Specialist: Monitor, Support & Fulfil (MSF) | 29 - 31 May 2024 | Live Virtual Class With Trainer | NOW £1395 + VAT (£100 OFF RRP) Learn more

Please Note: You can book this course and hold it in credit until you have decided on a specific course date. Alternatively, please view our other course dates

Our Writing Advanced SQL Queries training course will teach you to become proficient in the following:

  • Maximise the potential of SQL to build powerful, complex and robust SQL queries
  • Query multiple tables with inner joins, outer joins, and self joins
  • Construct recursive common table expressions
  • Summarise data using aggregation and grouping
  • Execute analytic functions to calculate ranks
  • Build simple and correlated subqueries
  • Thoroughly test SQL queries to avoid common errors
  • Select the most efficient solution to complex SQL problems

Our Writing Advanced SQL Queries training course covers the following Modules:

Module 1: Introduction and Overview

SQL fundamentals

  • Why SQL can be both easy and difficult
  • Recommendations for thorough testing

Retrieving data with SELECT

  • Expressions
  • Literals
  • Handling NULLs properly

Executing queries

  • Analysing query plans
  • Enhancing query performance
  • Retrieving partly results with FETCH and OFFSET
  • Selecting the best alternatives
  • Avoiding errors and pitfalls

Module 2: Querying Multiple Tables

Implementing various types of joins

  • Inner joins
  • Cross joins
  • Left, right and full outer joins
  • Equijoins vs theta joins
  • The performance implications of joins
  • Adding filter conditions to outer joins

Writing self joins

  • Joining a table to itself
  • Chaining self joins
  • Solving time-interval problems

Combining queries with set operators


Module 3: Aggregate Functions

Summarising data with aggregate functions

  • SUM
  • AVG
  • MIN
  • MAX
  • Managing NULLs
  • identifying duplicates

Grouping data

  • Applying conditions with HAVING
  • Calculating moving averages
  • Building crosstab reports

Extending group queries

  • Nesting grouped aggregates
  • Joins and grouping
  • Introducing subtotals with CUBE and ROLLUP

Module 4: Performing Extensive Analysis with Analytic Functions

The OVER clause

  • Specifying the ordering before applying the function
  • Splitting the result set into logical partitions

Calculating ranks

  • ROW_NUMBER with ordered sets
  • Calculating percentiles

Extending the use of aggregates

  • Partitioning in multiple levels
  • Computing running totals
  • Comparing row and aggregate values
  • Top-N queries
  • Defining sliding window boundaries

Module 5: Building Subqueries

Self-contained subqueries

  • Subqueries in conditions and column expressions
  • Creating multilevel subqueries
  • Avoiding problems when subqueries return NULLs
  • Handling multirow subquery results
  • Finding gaps in number series

Correlated subqueries

  • Accessing values from the outer query
  • EXISTS vs IN
  • Identifying duplicates
  • Avoiding accidental correlation

Common table expressions

  • Reusable subqueries
  • Recursive subqueries
  • Traversing hierarchies

Module 6: Breaking Down Complex Queries

  • Overcoming SQL limitations
  • Reducing complexity and improving performance

Our Writing Advanced SQL Queries training course will benefit several individuals and organisations including but not limited to:

  • Database Administrators
  • Data Analysts
  • Business Intelligence
  • Software Developers
  • Data Scientists
  • System Analysts
  • IT Professionals and Data Engineers
  • Researchers and Academics
  • Anyone who works with databases, manages data, or needs to retrieve and analyse data can benefit from learning advanced SQL query writing

Our Writing Advanced SQL Queries training course contains the following:

  • 3-day instructor-led training course
  • One-on-one after-course instructor coaching
  • End-of-course exam included
  • After-course computing sandbox included
  • Pre-reading
  • Course Manual
  • Quizzes
  • Exercises

Our Writing Advanced SQL Queries training course requires attendees to have experience at the level of our Introduction To SQL training course.

There is no recommended reading for our Writing Advanced SQL Queries training course.

Writing Advanced SQL Queries Exam:

  • Format: Multiple Choice
  • Questions: 40
  • Pass Mark: 70%
Proctored Exam
Writing Advanced SQL Queries Certificate

Attendees may enjoy our Querying SQL Databases Using T-SQL training course.

T-SQL is Microsoft's implementation of SQL (Structured Query Language) used to query and manage data in the SQL Server relational database.

Our two-day Querying SQL Databases Using T-SQL training course will provide you with the basic knowledge and skills to create queries using Transact-SQL.

It will teach you how to select, filter and sort data from multiple tables and how to use views and stored procedures.

Our Writing Advanced SQL Queries training course offers several benefits to individuals and Organisations including but not limited to:

  • Increased Career Opportunities: Proficiency in advanced SQL query writing is highly sought after in various industries.
  • Enhanced Data Retrieval: Advanced SQL queries enable you to retrieve specific subsets of data from large databases efficiently.
  • Improved Data Analysis: Advanced SQL queries empower you to perform complex calculations, aggregations, and transformations on data.
  • Optimal Query Performance: Writing advanced SQL queries involves understanding query optimisation techniques, indexing strategies, and query execution plans.
  • Streamlined Reporting and Business Intelligence: Advanced SQL query skills enable you to generate customised reports, build complex data models, and create interactive dashboards for business intelligence purposes.
  • Efficient Data Manipulation: Advanced SQL queries allow you to perform sophisticated data manipulation tasks, such as data cleansing, data merging, and data transformation.
  • Better Database Administration: For database administrators, advanced SQL query skills provide a deeper understanding of how queries interact with the database system.
  • Code Reusability and Maintainability: Advanced SQL queries promote modular and reusable code structures.

Writing Advanced SQL Queries FAQS

The duration of our Writing Advanced SQL Queries training course is three-days.


Writing Advanced SQL Queries Course Dates

Course date
Course Date

Course location

Now only £1975 + VAT

Course date
Course Date

Course location

Now only £1975 + VAT

Why Choose Us?

We Are Here To Help You Pass

All of our trainers have achieved exceptionally high delegate pass rates for accredited examinations for all our courses. We also offer complimentary pre and post-course support for any questions you may have.

We Are Flexible

We try and be as flexible as we can and accommodate your needs. We can swap delegates at any time with no charge. We can also create bespoke content should this be required.

We Are The Specialists

We specialise in IT Service and Project Management. All of our Trainers and Consultants have considerable years of hands-on experience in IT Service / Project Management, working across a wide number of industry sectors.

We Are Professionals

Our training, sales and admin staff are all professional, helpful, friendly and approachable. We believe in providing excellent customer service. You will always have a dedicated friendly Account Manager