Workshop

The Workshop provides quiz questions to help you solidify your understanding of the material covered and exercises to provide you with experience in using what you've learned. Try to answer the quiz and exercise questions before checking the answers in Appendix A, "Answers to Quizzes and Exercises," and make sure that you understand the answers before continuing to the next lesson.

Quiz

1:Put the following keywords in order to make a SELECT statement work properly:
  • GROUP BY

  • HAVING

  • SELECT

  • DISTINCT

  • WHERE

  • FROM

  • ORDER BY

  • ROLLUP

2:What is the difference between COUNT(*) and COUNT(expression)?
3:Is the following query permitted? If not, how would you correct it?
select ProductID, ProductName
  from Products
 where UnitPrice > avg(UnitPrice)
4:Is the ...

Get Sams Teach Yourself Transact-SQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.