Microsoft SQL training exercises (page 1 of 8)

Showing exercises 1-20 (out of 156)

Category: SQL
Topic: Simple Queries
Level: Relatively easy
Course: Introduction to SQL
Exercise: Create a query to list out all of the events in the database, with the most recent first.

Go to exercise ...

Category: SQL
Topic: Simple Queries
Level: Relatively easy
Course: Introduction to SQL
Exercise: Create a query using TOP N to show the last 3 categories in a table.

Go to exercise ...

Category: SQL
Topic: Simple Queries
Level: Average difficulty
Course: Introduction to SQL
Exercise: Create a query to list the first 5 events in chronological order.

Go to exercise ...

Category: SQL
Topic: Simple Queries
Level: Harder than average
Course: Introduction to SQL
Exercise: Run two SELECT queries to show the first and last events.

Go to exercise ...

Category: SQL
Topic: Setting criteria using WHERE
Level: Relatively easy
Course: Introduction to SQL
Exercise: Create a query to list all of the love and relationships events.

Go to exercise ...

Category: SQL
Topic: Setting criteria using WHERE
Level: Average difficulty
Course: Introduction to SQL
Exercise: Us a WHERE clause to show events which contain two given text strings.

Go to exercise ...

Category: SQL
Topic: Setting criteria using WHERE
Level: Average difficulty
Course: Introduction to SQL
Exercise: Use a WHERE clause to show all of the events between two given dates.

Go to exercise ...

Category: SQL
Topic: Setting criteria using WHERE
Level: Harder than average
Course: Introduction to SQL
Exercise: 3 challenging queries combining criteria to find possible data anomalies.

Go to exercise ...

Category: SQL
Topic: Setting criteria using WHERE
Level: Harder than average
Course: Introduction to SQL
Exercise: Use wildcards, AND, IN and OR to get a list of events to do with water.

Go to exercise ...

Category: SQL
Topic: Calculations
Level: Relatively easy
Course: Introduction to SQL
Exercise: List for each event the number of characters in its name.

Go to exercise ...

Category: SQL
Topic: Calculations
Level: Average difficulty
Course: Introduction to SQL
Exercise: Cast numbers as text to allow you to concatenate them together with strings.

Go to exercise ...

Category: SQL
Topic: Calculations
Level: Average difficulty
Course: Introduction to SQL
Exercise: Write a CASE WHEN expression to assign countries to different groups.

Go to exercise ...

Category: SQL
Topic: Calculations
Level: Average difficulty
Course: Introduction to SQL
Exercise: Use IsNull, Coalesce and/or CASE WHEN to replace nulls with values.

Go to exercise ...

Category: SQL
Topic: Calculations
Level: Harder than average
Course: Introduction to SQL
Exercise: Use the CHARINDEX function multiple times to show the number of characters between two words in a text string.

Go to exercise ...

Category: SQL
Topic: Calculations
Level: Harder than average
Course: Introduction to SQL
Exercise: Use the % modulus operator and a lot of ingenuity to show how big each country is relative to Wales.

Go to exercise ...

Category: SQL
Topic: Calculations
Level: Harder than average
Course: Introduction to SQL
Exercise: Divide events according to whether their first/last letters are the same or vowels.

Go to exercise ...

Category: SQL
Topic: Calculations using dates
Level: Relatively easy
Course: Introduction to SQL
Exercise: Combine the YEAR, CONVERT and FORMAT functions to show events in your year of birth.

Go to exercise ...

Category: SQL
Topic: Calculations using dates
Level: Average difficulty
Course: Introduction to SQL
Exercise: Use the DATEDIFF and the ABS functions to list the events in order of closeness to when you were born.

Go to exercise ...

Category: SQL
Topic: Calculations using dates
Level: Average difficulty
Course: Introduction to SQL
Exercise: Use the DATENAME and DATEPART functions to show events taking place on Friday 13th of any month/year.

Go to exercise ...

Category: SQL
Topic: Calculations using dates
Level: Harder than average
Course: Introduction to SQL
Exercise: Display full dates, including the correct suffix (1st, 2nd, 3rd, etc).

Go to exercise ...

This page has 0 threads Add post