# SQLite Helper Queries

DevFeed: [SQLite Helper Queries](<https://devfeed.tech/articles/sqlite-helper-queries-25524.md>)

Original publisher: [Read original article](<https://aleckazakova.com/posts/cte/>)

Author: Author

Published: 2020-05-14T01:31:03Z

Content type: tutorial

Language: en

Sources: [Posts on AlecStrong](<https://devfeed.tech/sources/posts-on-alecstrong.md>)

Topics: [SQLite](<https://devfeed.tech/topics/sqlite.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [programming](<https://devfeed.tech/tags/programming.md>), [sql](<https://devfeed.tech/tags/sql.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>)

## AI overview

This tutorial explains how common table expressions can simplify complex SQLite queries. It compares a correlated subquery with a materialized common table expression, discusses query-plan implications, and demonstrates recursive queries for splitting a string into words.

## Source excerpt

In programming one of the earliest tools we're given for simplifying complex code is helper functions. Splitting code into smaller more digestible blocks makes it easier to maintain and read, which is usually more important than code that's easier to write. In SQL we have tools for accomplishing the same thing! One of the bigger ones is views which can help share an underlying query between multiple other ones. Leandro Favarin wrote a great post on how to put views into practice in SQLite here.