FIND YOUR NEXT FEW LINES

Results for “post”

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

253 snippets foundClear filters
PostgresRows & writes

Return an inserted row

Read generated data directly from INSERT.

RETURNING✓ Tested
SQLReporting & grouped calculations

Return zero for a sum over no rows

SQL: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.

SQL✓ Tested
PostgresDates & series

Round a timestamp down to its month

Group dates by a calendar boundary.

date_trunc✓ Tested
SQLGetting Started

Run a first SELECT query

SQL: Return a literal value without creating a table.

SQL✓ Tested
SQLText cleanup & matching

Search for a literal LIKE wildcard

SQL: Declare an escape character so a percent sign in the pattern is literal.

SQL✓ Tested
PostgresRows & writes

Search text without case sensitivity

Match a pattern with PostgreSQL ILIKE.

ILIKE✓ Tested
SQLSelect & filter

Select an inclusive range

Find rows with values between two endpoints.

BETWEEN✓ Tested
SQLSelect & filter

Select specific columns

Read only the fields a result needs.

SELECT✓ Tested
SQLWindow analytics

Select the top row in each group with a tie-breaker

SQL: Filter an outer query on ROW_NUMBER because window functions are not evaluated in WHERE.

SQL✓ Tested
SQLGetting Started

Select values in an inclusive range

SQL: BETWEEN includes both endpoints of the range.

SQL✓ Tested
SQLWindow analytics

Show a group total beside each detail row

SQL: A partitioned aggregate preserves detail rows instead of collapsing them with GROUP BY.

SQL✓ Tested
SQLSubqueries & ranked selection

Sort preferred rows ahead of other rows

SQL: A CASE ordering key expresses business priority before a stable secondary sort.

SQL✓ Tested