substr()

A function that returns part of a text value, given a start position and a length.

In more detail

substr(ordered_on, 1, 7) takes the first seven characters of a date stored as year-month-day text, which is the year and month. The course uses it to group orders by month in SQLite, where there is no date type.

Related terms

Taught in

References