> For the complete documentation index, see [llms.txt](https://metis-montessori-lyceum.gitbook.io/sql-0/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://metis-montessori-lyceum.gitbook.io/sql-0/functies/untitled.md).

# Uitleg

De taal SQL kent een aantal functies die je kunt gebruiken om berekeningen uit te laten voeren, of om het aantal rijen te tellen, of om de kolommen op een bepaalde manier af te drukken.

Als je de volgende query gebruikt dan wordt de gemiddelde lengte van een track weergegeven:

(AVG is de afkorting van average, en dat betekent: gemiddelde)

```sql
select AVG(Milliseconds) 
from Track;
```

Hieronder een lijst van de meest belangrijke statistische functies binnen SQL(lite).

| max(kolom)   | Berekent de maximale waarde binnen een kolom         |
| ------------ | ---------------------------------------------------- |
| min(kolom)   | Berekent de minimale waarde binnen een kolom         |
| avg(kolom)   | Berekent het gemiddelde                              |
| count(kolom) | Berekent het aantal rijen                            |
| sum(kolom)   | Telt de waarden uit een gegeven kolom bij elkaar op. |

Een voorbeeld om tellen hoeveel klanten wij hebben:

```sql
select count(*) 
from customer;
```

### Round

Nog een voorbeeld van een functie in SQL is de ROUND-functie. ROUND(kolom, aantal decimalen) zorgt ervoor dat de getallen in de betreffende kolom worden afgerond op het aantal decimalen dat je hebt opgegeven.

```sql
select Name, Round(avg(Milliseconds), 2) 
from Track;
```

Kun je uitleggen wat deze functie nu laat zien?

### Length

Een andere functie is de functie Length. Length(kolomnaam) geeft het aantal tekens van de woorden in de kolom.

```sql
select Name, Length(Name)
from Track;
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://metis-montessori-lyceum.gitbook.io/sql-0/functies/untitled.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
