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 from the attachment in the left sidebar.
The examples and SQL script are also available at https://downloads.teradata.com.