Results for “sort”
Small, practical examples. Search by task or narrow things down below.
Read the smallest and largest values
Postgres: Use MIN and MAX without sorting and fetching every row.
Postgres✓ Tested
Read the smallest and largest values
SQLite: Use MIN and MAX without sorting and fetching every row.
SQLite✓ Tested
Reject one outlier with a median-of-three filter
Arduino / C: Sorting three values leaves the median in the middle.
Arduino / C✓ Tested
Remove duplicate values
Use LINQ Distinct and OrderBy for a sorted C# result.
C#✓ Tested
Search text without case sensitivity
Match a pattern with PostgreSQL ILIKE.
ILIKE✓ Tested
Sum a row and its immediate predecessor
SQL: A ROWS frame counts physical ordered rows rather than all peers with the same sort value.
SQL✓ Tested
Sum a row and its immediate predecessor
SQL Server: A ROWS frame counts physical ordered rows rather than all peers with the same sort value.
SQL Server✓ Tested
Sum a row and its immediate predecessor
Postgres: A ROWS frame counts physical ordered rows rather than all peers with the same sort value.
Postgres✓ Tested
Sum a row and its immediate predecessor
SQLite: A ROWS frame counts physical ordered rows rather than all peers with the same sort value.
SQLite✓ Tested
Visit associative-array keys in a stable order
Bash Scripts: Associative arrays have no defined iteration order, so sort their keys explicitly.
Bash Scripts✓ Tested
Visit files recursively
Java: Close the stream returned by Files.walk and sort relative paths for stable output.
Java✓ Tested