Exploring common table expressions We need to go deeper Exploring common table expressions 2016-08-27 Gothenburg, Sweden
Primary sponsors
The others… 2016-08-27 Gothenburg, Sweden
Don’t miss Evaluations The Raffle
We need to go deeper: Exploring CTEs Daniel Hutmacher SQL Server developer and independent contractor by day. Spinning instructor by night. I love coffee, travel, cycling, loud music and making SQL Server queries go really fast. Like, stupid-fast. 2016-08-27 Gothenburg, Sweden
We need to go deeper: Exploring CTEs Common table expressions 2016-08-27 Gothenburg, Sweden
We need to go deeper: Exploring CTEs Script 01 2016-08-27 Gothenburg, Sweden
We need to go deeper: Exploring CTEs CTEs are not materialized A common table expression is a glorified view It won’t materialize 2016-08-27 Gothenburg, Sweden
We need to go deeper: Exploring CTEs CTEs in sequence You can put multiple CTEs in a statement, separated by commas. You can even UPDATE or DELETE in a CTE. 2016-08-27 Gothenburg, Sweden
We need to go deeper: Exploring CTEs Recursive CTEs 2016-08-27 Gothenburg, Sweden
We need to go deeper: Exploring CTEs Script 03 2016-08-27 Gothenburg, Sweden
We need to go deeper: Exploring CTEs Recursive CTEs Anchor Recursion Stop condition (optional) OPTION (MAXRECURSION) (optional) 2016-08-27 Gothenburg, Sweden
We need to go deeper: Exploring CTEs Script 04 2016-08-27 Gothenburg, Sweden
A simple CTE Anchor 2016-08-27 Gothenburg, Sweden
A simple CTE Recursion 2016-08-27 Gothenburg, Sweden
A simple CTE Stop condition 2016-08-27 Gothenburg, Sweden
The Fibonacci series example 2016-08-27 Gothenburg, Sweden
The Fibonacci series example recursion=0 a=0, b=1 2016-08-27 Gothenburg, Sweden
The Fibonacci series example recursion=0 a=0, b=1 2016-08-27 Gothenburg, Sweden
The Fibonacci series example 2016-08-27 Gothenburg, Sweden
The Fibonacci series example recursion=recursion+1 2016-08-27 Gothenburg, Sweden
The Fibonacci series example Do this... 2016-08-27 Gothenburg, Sweden
The Fibonacci series example Do this... WHERE a<100 000 000 2016-08-27 Gothenburg, Sweden
The Fibonacci series example Do this... a=b, b=a+b 2016-08-27 Gothenburg, Sweden
The Fibonacci series example recursions<100 ? If not, crash and burn. 2016-08-27 Gothenburg, Sweden
The Fibonacci series example 2016-08-27 Gothenburg, Sweden
The Fibonacci series example rinse, repeat... 2016-08-27 Gothenburg, Sweden
We need to go deeper: Exploring CTEs What can we do with recursive CTEs? Number series String parsing (like split/merge) Hierarchies Dependency trees 2016-08-27 Gothenburg, Sweden
We need to go deeper: Exploring CTEs Script 05-09 2016-08-27 Gothenburg, Sweden
We need to go deeper: Exploring CTEs Bonus: can recursive CTEs be made parallel? Script 10 2016-08-27 Gothenburg, Sweden
We need to go deeper: Exploring CTEs Questions! E-mail: daniel@strd.co Twitter: @dhmacher Blog: sqlsunday.com Old-school: +46 70-543 7331 2016-08-27 Gothenburg, Sweden