SQLChallenges

The Idempotent TSQL SQLChallenge (28 minutes)

The Idempotent TSQL SQLChallenge (28 minutes)

When writing TSQL, it’s often useful to make your TSQL idempotent – a fancy word, which in the case of databases really just means: you can run the command again and again and it will make sure that you have the intended effect, without causing problems by being run more than once.

Who Made That Schema Change? An Event Notification SQLChallenge (27 minutes)

Who Made That Schema Change? An Event Notification SQLChallenge (27 minutes)

In this challenge, you get to take a crack at creating an Event Notification to track schema changes.

Who Made That Schema Change? A DDL Trigger SQLChallenge (28 minutes)

Who Made That Schema Change? A DDL Trigger SQLChallenge (28 minutes)

In this challenge, you get to take a crack at writing a DDL Trigger to track schema changes.

A Query Writing SQLChallenge: The Most Unique Names (23 minutes)

A Query Writing SQLChallenge: The Most Unique Names (23 minutes)

Flex your T-SQL skills: you’re challenged to write four different (but related) queries in this query writing challenge.

A Dynamic SQLChallenge (32 minutes)

A Dynamic SQLChallenge (32 minutes)

In this challenge, you are tasked with editing a stored procedure to gather data from multiple databases. What’s the most efficient way to do it? Try your hand at the challenge, then check out three different suggested solutions.

Tune the Peak Years Procedure - SQLChallenge (52 minutes)

Tune the Peak Years Procedure - SQLChallenge (52 minutes)

Ready to tune some TSQL? In this challenge, you’re given a database to restore. You’ll create two indexes and a constraint in the database– and you aren’t allowed to change those.

Tuning a Stored Procedure - SQLChallenge (1 hour 10 minutes)

Tuning a Stored Procedure - SQLChallenge (1 hour 10 minutes)

Your challenge is to identify which statement is slowing down our stored procedure the most, then tune the code to speed it up.

Deduplicate Indexes - Level 1 SQLChallenge (56 minutes)

Deduplicate Indexes - Level 1 SQLChallenge (56 minutes)

Your challenge is to de-duplicate the indexes on a table in a sample database. Can you predict which indexes are the safest ones to drop?

Index Design SQLChallenge - One Year Wonders (50 minutes)

Index Design SQLChallenge - One Year Wonders (50 minutes)

This challenge comes in three possible levels of difficulty: choose one or work through them all!

Speed Up the Popular Names Query SQLChallenge (46 minutes)

Speed Up the Popular Names Query SQLChallenge (46 minutes)

You’ve got a query that is just too slow!

Forcing Parallelism SQLChallenge (48 minutes)

Forcing Parallelism SQLChallenge (48 minutes)

A database administrator has changed Cost Threshold for Parallelism on the instance, and you’ve got a query that’s slowed down.

Defuse the Deadlock SQLChallenge (23 minutes)

Defuse the Deadlock SQLChallenge (23 minutes)

Sharpen your skills at fighting blocking and deadlocks.