FIND YOUR NEXT FEW LINES

The snippet library.

Small, practical examples. Search by task or narrow things down below.

25 snippets foundClear filters
SQLiteGetting Started

Join related rows from two tables

SQLite: Match a category key to its display label with an explicit join condition.

SQLite✓ Tested
SQLiteGetting Started

Keep rows matching a condition

SQLite: Use WHERE to select rows with a particular category.

SQLite✓ Tested
SQLiteGetting Started

Match a text prefix

SQLite: Use a percent wildcard after a known prefix.

SQLite✓ Tested
SQLiteGetting Started

Match one value from a short list

SQLite: Use IN for a set of allowed values.

SQLite✓ Tested
SQLiteGetting Started

Read named columns from a table

SQLite: Choose the columns needed and request a deterministic row order.

SQLite✓ Tested
SQLiteGetting Started

Read the smallest and largest values

SQLite: Use MIN and MAX without sorting and fetching every row.

SQLite✓ Tested
SQLiteGetting Started

Remove duplicate result values

SQLite: Use DISTINCT when repeated category values are not useful.

SQLite✓ Tested
SQLiteGetting Started

Require two filtering conditions

SQLite: Combine category and quantity conditions with AND.

SQLite✓ Tested
SQLiteGetting Started

Run a first SELECT query

SQLite: Return a literal value without creating a table.

SQLite✓ Tested
SQLiteGetting Started

Select values in an inclusive range

SQLite: BETWEEN includes both endpoints of the range.

SQLite✓ Tested
SQLiteGetting Started

Sort the highest quantities first

SQLite: Specify descending order and a stable tie breaker.

SQLite✓ Tested
SQLiteGetting Started

Turn a condition into a result label

SQLite: Use CASE to describe stock availability for each row.

SQLite✓ Tested