Results for “GROUP BY”
Small, practical examples. Search by task or narrow things down below.
Reference a parent identified by two columns
SQLite: A composite foreign key checks the complete referenced key rather than either column independently.
SQLite✓ Tested
Reject an integer outside a byte’s range
Reject an integer outside a byte’s range using a complete Go program with explicit sample inputs.
Go✓ Tested
Remove a list item by identifier
Remove a list item by identifier with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Remove duplicate records by a selected key
C#: DistinctBy keeps the first record for each key in encounter order.
C#✓ Tested
Remove related events by namespace
jQuery: Namespaced events let a feature clean up its own handlers.
jQuery✓ Tested
Render groups with nested loops
Render groups with nested loops with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Render nested groups with stable keys
Render nested groups with stable keys with a small React component and explicit browser behavior.
React✓ Tested
Replace bytes at a known position in a binary file
C: Open in update mode and seek before writing a fixed-size replacement.
C✓ Tested
Replace text using captured regex groups
C++: Numbered replacement groups can rearrange a known two-part name.
C++✓ Tested
Reset child state by changing its key
Reset child state by changing its key with a small React component and explicit browser behavior.
React✓ Tested
Resolve a merge by writing the intended final file
Git: After a conflict, edit the result, stage it, and finish the merge commit.
Git✓ Tested
Return all rows tied for the maximum in a group
SQL: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.
SQL✓ Tested