Results for “order”
Small, practical examples. Search by task or narrow things down below.
Find the common members of two sorted sets
C++: set_intersection requires both input ranges to be sorted under the same comparator.
C++✓ Tested
Find the insertion position for a sorted value
C++: lower_bound returns the first position whose value is not less than the search key.
C++✓ Tested
Select specific columns
Read only the fields a result needs.
SELECT✓ Tested
Select the highest values with TOP
Limit an ordered SQL Server result.
TOP✓ Tested
Sort only the smallest requested prefix
C++: partial_sort orders the selected prefix without guaranteeing the order of the remainder.
C++✓ Tested
Sort preferred rows ahead of other rows
SQL: A CASE ordering key expresses business priority before a stable secondary sort.
SQL✓ Tested
Sort preferred rows ahead of other rows
SQL Server: A CASE ordering key expresses business priority before a stable secondary sort.
SQL Server✓ Tested
Sort preferred rows ahead of other rows
Postgres: A CASE ordering key expresses business priority before a stable secondary sort.
Postgres✓ Tested
Sort preferred rows ahead of other rows
SQLite: A CASE ordering key expresses business priority before a stable secondary sort.
SQLite✓ Tested
Sort records by two fields
C++: Tuple comparison implements lexicographic ordering across several keys.
C++✓ Tested
Sort the highest quantities first
SQL: Specify descending order and a stable tie breaker.
SQL✓ Tested
Sort the highest quantities first
SQL Server: Specify descending order and a stable tie breaker.
SQL Server✓ Tested