FIND YOUR NEXT FEW LINES

Results for “ORDER BY”

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

553 snippets foundClear filters
JavaEncoding & structured values

Read a big-endian integer from bytes

Java: Set a byte order explicitly when handling a binary protocol.

Java✓ Tested
C#LINQ transformations

Remove duplicate records by a selected key

C#: DistinctBy keeps the first record for each key in encounter order.

C#✓ Tested
Linux CommandsTransforming text

Reorder fields with a capture group

Linux Commands: Use extended regular expressions and backreferences to rearrange a known format.

Linux Commands✓ Tested
PowerShellArray operations

Select elements by an index range

PowerShell: An index range selects the requested array positions in order.

PowerShell✓ Tested
CBinary formats & structured parsing

Serialize a 16-bit integer in big-endian order

C: Explicit shifts make a byte format independent of the CPU’s native byte order.

C✓ Tested
Linux CommandsSorting & joining records

Sort values in descending order

Linux Commands: Combine numeric sorting with reverse order.

Linux Commands✓ Tested
SQLWindow analytics

Calculate a cumulative integer percentage

SQL: Divide a running window sum by the complete total using a unique ordering key.

SQL✓ Tested
SQL ServerWindow analytics

Calculate a cumulative integer percentage

SQL Server: Divide a running window sum by the complete total using a unique ordering key.

SQL Server✓ Tested
PostgresWindow analytics

Calculate a cumulative integer percentage

Postgres: Divide a running window sum by the complete total using a unique ordering key.

Postgres✓ Tested
SQLiteWindow analytics

Calculate a cumulative integer percentage

SQLite: Divide a running window sum by the complete total using a unique ordering key.

SQLite✓ Tested
PostgresRows & writes

Get the latest row in each group

Select one ordered row per key with DISTINCT ON.

DISTINCT ON✓ Tested
SQLiteQueries & text

Join values with a delimiter

Concatenate rows in a specified order.

group_concat✓ Tested