> For the complete documentation index, see [llms.txt](https://mass-street-data-school.gitbook.io/deng100-workbook-example/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mass-street-data-school.gitbook.io/deng100-workbook-example/syllabus/lecture-organization/sample-code.md).

# Sample Code

All source code shown in lecture can be directly downloaded from your workbook.

Source code can be easily downloaded by simply copying it to the clipboard using the button in the upper right-hand corner of the code block window, and then pasting into a text file. You can test this using the code example below.

```sql
USE AdventureWorks2016

SELECT MAX(LineTotal) AS BiggestLineTotal
FROM Sales.SalesOrderDetail
 
SELECT MIN(LineTotal) AS SmallestLineTotal
FROM Sales.SalesOrderDetail

SELECT AVG(LineTotal) AS AverageLineTotal
FROM Sales.SalesOrderDetail

SELECT COUNT(SalesOrderDetailID) AS TotalRecordsInTable
FROM Sales.SalesOrderDetail

SELECT SUM(LineTotal) AS TotalOfTheOrdersInTheTable
FROM Sales.SalesOrderDetail
```
