Microsoft SQL training exercises | Archived (page 1 of 4)

Showing exercises 1-20 (out of 70)

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Apply a simple error trap to delete a temporary table if it exists before creating it.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create a scalar function to return the weekday for a given date.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create an in-line table-valued function to return all of the courses which occur between 2 dates which you pass into the function as parameters.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create a simple query to list historical events, with the most recent first.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create a query listing countries and continents, using an inner join with table aliases.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create an SQL query showing the count of events for each country, showing the use of GROUP BY.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create a procedure which takes one parameter (the name of a category) and selects all websites in that category.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Use a temporary table to show all the organisations which are either in a particular sector or which employ more than a certain number of people.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Script a view in the query window to show all events occurring in 2000, then modify this in the view designer.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create a function to show when a course ends, given its start date and how long it lasts, and use this function in a query.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create a query to show for each event in history the length of the description entered.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Format each date in a table, then show how long ago it was (in whole years) using DateDiff.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create a query showing all of the continents with no matching countries, using a left outer join.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create a query listing all of the historical events which have happened in Germany in the 1940s.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create a cursor to loop over a table of cursors, writing out the details for each.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create a simple view joining 2 tables together, then script a simple change to it.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create a stored procedure to show the top 10 websites in the UK, and check it runs OK.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create a stored procedure which returns all of the events between 2 dates.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create a subquery showing all events which have happened since the last one involving the European Union.

Go to exercise ...

Category: SQL
Topic: Archived
Level: Relatively easy
Course:
Exercise: Create a table variable, and insert into the table C# courses and courses given by a particular trainer - then list the results.

Go to exercise ...

This page has 0 threads Add post