Results for “GROUP BY”
Small, practical examples. Search by task or narrow things down below.
Report duplicate business values and their frequency
SQL: Group by a candidate business key and retain only groups with multiple rows.
SQL✓ Tested
Report duplicate business values and their frequency
SQL Server: Group by a candidate business key and retain only groups with multiple rows.
SQL Server✓ Tested
Report duplicate business values and their frequency
Postgres: Group by a candidate business key and retain only groups with multiple rows.
Postgres✓ Tested
Report duplicate business values and their frequency
SQLite: Group by a candidate business key and retain only groups with multiple rows.
SQLite✓ Tested
Round a timestamp down to its month
Group dates by a calendar boundary.
date_trunc✓ Tested
Advance a date by a number of days
Python: Use timedelta so month and year boundaries are handled automatically.
Python✓ Tested
Allow one disclosure in a named group to stay open
HTML: Matching details name attributes create an exclusive native accordion in supporting browsers.
HTML✓ Tested
Bind a radio-button group
Bind a radio-button group with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Build a first radio-button group
HTML: Learn how to build a first radio-button group in a complete browser example.
HTML✓ Tested
Calculate a CRC-8 over a byte sequence
Arduino / C: This implementation uses polynomial 0x07, initial zero, and no reflection.
Arduino / C✓ Tested
Calculate a total for each group
SQL: Group nonmissing categories and calculate separate totals.
SQL✓ Tested
Calculate a total for each group
SQL Server: Group nonmissing categories and calculate separate totals.
SQL Server✓ Tested