Every complete example in this document is available in a zip file that you can download. The zip file includes a SQL script file that creates the input tables for the examples. If you are reading this document on https://docs.teradata.com/, you can download the zip file (SQLE-Analytic-Functions-Examples_xxxx) from the attachment in the left pane.