Well, I’m running a bit late. Both for this month and the fact I completely missed last month. It was unavoidable but I’m back and since it’s a bit late in the month (I generally try to post homework at the beginning of the month) let’s do something easy.
Write a select statement
Things you could include so you don’t decide this is too easy to bother with.
- More than one table
- INNER join
- OUTER join
- CROSS join
- CTE
- Subselect(s)
- CROSS or OUTER APPLY
- GROUP BY
- HAVING
- ORDER BY
- UNION, EXCEPT, INTERSECT
I could go on but I want this to be fairly easy (but not too easy). I mean if you want to push yourself make it so the output is XML or JSON. Maybe throw in a GROUPING SET.
Also, please watch out for formatting and best practices. For example adding semicolons at the end of the command and not using SELECT *. Let’s pretend that whatever query you write is going to be looked at by a potential employer or the community at large.