Results for “read rows”
Small, practical examples. Search by task or narrow things down below.
Return an inserted row
Read generated data directly from INSERT.
RETURNING✓ Tested
Select specific columns
Read only the fields a result needs.
SELECT✓ Tested
Add values across several rows
SQL: Use SUM to calculate a total quantity.
SQL✓ Tested
Add values across several rows
SQL Server: Use SUM to calculate a total quantity.
SQL Server✓ Tested
Add values across several rows
Postgres: Use SUM to calculate a total quantity.
Postgres✓ Tested
Add values across several rows
SQLite: Use SUM to calculate a total quantity.
SQLite✓ Tested
Average a fixed set of readings
Accumulate sample values without overflowing a 16-bit total.
array✓ Tested
Borrow local data in a scoped thread
Borrow local data in a scoped thread in a complete Rust program using the standard library.
Rust✓ Tested
Build a JSON array from rows
Aggregate ordered text values into JSON.
json_group_array✓ Tested
Calculate changes between successive readings
C++: adjacent_difference keeps the first value and then writes each difference from its predecessor.
C++✓ Tested
Calculate differences between adjacent readings
JavaScript: Slice off the first value and compare each remaining value with its predecessor.
JavaScript✓ Tested
Calculate differences between adjacent readings
TypeScript: Slice off the first value and compare each remaining value with its predecessor.
TypeScript✓ Tested