Results for “GROUP BY”
Small, practical examples. Search by task or narrow things down below.
Collapse repeated spaces
Linux Commands: Use tr -s when repeated occurrences of a character should become one.
Linux Commands✓ Tested
Collect a serial line in a fixed buffer
Read a short command without dynamic String allocation.
serial line✓ Tested
Combine text values with a separator
SQL: Use the concatenation operator supported by the selected SQL dialect.
SQL✓ Tested
Combine text values with a separator
SQL Server: Use the concatenation operator supported by the selected SQL dialect.
SQL Server✓ Tested
Combine text values with a separator
Postgres: Use the concatenation operator supported by the selected SQL dialect.
Postgres✓ Tested
Combine text values with a separator
SQLite: Use the concatenation operator supported by the selected SQL dialect.
SQLite✓ Tested
Compare floating-point calculations with tolerance
Python: Use isclose instead of exact equality for results affected by floating-point rounding.
Python✓ Tested
Compress a stream to a chosen filename
Linux Commands: Use gzip -c to leave the source file untouched and choose the destination explicitly.
Linux Commands✓ Tested
Compute a simple XOR checksum
C: XOR all payload bytes into one byte to demonstrate a basic error-detection field.
C✓ Tested
Construct a date from Unix seconds
JavaScript: Multiply seconds by 1000 before creating a Date.
JavaScript✓ Tested
Construct a date from Unix seconds
TypeScript: Multiply seconds by 1000 before creating a Date.
TypeScript✓ Tested
Convert a Unix timestamp to UTC
Linux Commands: Use the @ syntax with GNU date for seconds since the Unix epoch.
Linux Commands✓ Tested