> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lightdash.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SQL templates

> Copy-paste SQL patterns for common table calculations like running totals and rankings

<Tip>
  Looking for a simpler alternative to raw SQL? Check out the built-in [row functions](/explore/table-calculations/functions/row-functions) and [pivot functions](/explore/table-calculations/functions/pivot-functions) — they handle common patterns like accessing previous rows and working across pivot columns without needing to write window function SQL.
</Tip>
