FIND YOUR NEXT FEW LINES

Results for “ORDER BY”

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

553 snippets foundClear filters
SQL ServerDates & text

Join rows in a chosen order

Aggregate text with STRING_AGG and WITHIN GROUP.

STRING_AGG✓ Tested
PostgresWindows & text

Join text rows in a chosen order

Combine values using string_agg.

string_agg✓ Tested
Linux CommandsSorting & joining records

Join two sorted files by a shared key

Linux Commands: Use join for sorted, simple delimiter-separated records with one row per key.

Linux Commands✓ Tested
CStructures & function interfaces

Keep caller data unchanged by passing a structure by value

C: A value parameter is a copy of the original structure.

C✓ Tested
Bash ScriptsProcesses & environment

Keep loop state by avoiding a pipeline subshell

Bash Scripts: Redirect input into a while loop so updates to a counter remain in the current shell.

Bash Scripts✓ Tested
GoTesting & reusable helpers

Limit the bytes read from a stream

Limit the bytes read from a stream using a complete Go program with explicit sample inputs.

Go✓ Tested
GitCommit history & revision selection

List files changed by the current commit

Git: diff-tree exposes the paths changed between a commit and its parent.

Git✓ Tested
GitInspecting the working tree

List files tracked by Git

Git: ls-files reads the index instead of listing every file in the working directory.

Git✓ Tested
C++Filesystem operations

List regular files recursively in sorted order

C++: Collect relative paths before sorting because directory iteration order is unspecified.

C++✓ Tested
SQLRelationships & missing data

List unordered pairs without duplicate reversals

SQL: Join using an increasing key comparison to omit self-pairs and reversed duplicates.

SQL✓ Tested
SQL ServerRelationships & missing data

List unordered pairs without duplicate reversals

SQL Server: Join using an increasing key comparison to omit self-pairs and reversed duplicates.

SQL Server✓ Tested
PostgresRelationships & missing data

List unordered pairs without duplicate reversals

Postgres: Join using an increasing key comparison to omit self-pairs and reversed duplicates.

Postgres✓ Tested