Completed SQL examples, including CTEs, views, functions, explain & index.