Results for “fold”
Small, practical examples. Search by task or narrow things down below.
Find records without any related rows
SQLite: NOT EXISTS avoids the NULL pitfalls of NOT IN when the subquery column can be missing.
SQLite✓ Tested
Find rows in the first result but not the second
SQLite: EXCEPT calculates a distinct result-set difference.
SQLite✓ Tested
Find rows shared by two query results
SQLite: INTERSECT compares complete selected rows and removes duplicates.
SQLite✓ Tested
Find the first day of a month
Round a date to its calendar month boundary.
date✓ Tested
Find the first matching value
Find the first matching value in a complete Rust program using the standard library.
Rust✓ Tested
Find the second-highest distinct value
SQLite: Select the maximum below the overall maximum to skip ties at the top.
SQLite✓ Tested
Find the weekday for a date
Find the weekday for a date using a complete Go program with explicit sample inputs.
Go✓ Tested
Flatten nested collections
Flatten nested collections in a complete Rust program using the standard library.
Rust✓ Tested
Format a known UTC timestamp
Linux Commands: Use GNU date -u and an explicit input offset to avoid local timezone dependence.
Linux Commands✓ Tested
Format a numeric label with leading zeroes
Bash Scripts: Use a constant printf format string and supply values as separate arguments.
Bash Scripts✓ Tested
Format a readable status message
Format a readable status message using a complete Go program with explicit sample inputs.
Go✓ Tested
Format a timestamp
Extract a year and month from ISO timestamp text.
strftime✓ Tested