FIND YOUR NEXT FEW LINES

Results for “ORDER BY”

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

553 snippets foundClear filters
ReactLists & filtering

Preserve item state while reordering by key

Preserve item state while reordering by key with a small React component and explicit browser behavior.

React✓ Tested
PostgresJSON & arrays

Collect ordered values into an array

Build a sorted array from query rows.

array_agg✓ Tested
C++Ordering & set operations

Sort records by two fields

C++: Tuple comparison implements lexicographic ordering across several keys.

C++✓ Tested
SQLSelect & filter

Select specific columns

Read only the fields a result needs.

SELECT✓ Tested
SQL ServerSelect & page

Select the highest values with TOP

Limit an ordered SQL Server result.

TOP✓ Tested
PowerShellCollections & objects

Count items by group

Group repeated values and report each count.

Group-Object✓ Tested
C#Collections

Count words with GroupBy

Group repeated C# words and print ordered counts.

C#✓ Tested
PowerShellHashtables & object records

Enumerate hashtable entries in a stable order

PowerShell: Sort entries by key when predictable output matters.

PowerShell✓ Tested
JavaStream transformations

Group strings by their length

Java: Choose a TreeMap supplier when group keys must have deterministic order.

Java✓ Tested
CStructures & function interfaces

Initialize structure fields by name

C: Designated initializers make field assignments independent of their declaration order.

C✓ Tested
PowerShellFiles & paths

List files by extension

Enumerate regular files and return their names in order.

Get-ChildItem✓ Tested
PythonStructured data & serialization

Pack and unpack a network-order integer

Python: Use an explicit byte order so the binary format is independent of the host architecture.

Python✓ Tested