mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-23 08:55:40 +01:00
Implement total() aggregation function
- Returns 0.0 when called on non integer / non float columns - Always returns floating point number - fix: default for sum() should be NULL when there is no non-NULL row per docs
This commit is contained in:
@@ -41,6 +41,10 @@ do_execsql_test select-sum {
|
||||
SELECT sum(age) FROM users;
|
||||
} {503960}
|
||||
|
||||
do_execsql_test select-total {
|
||||
SELECT sum(age) FROM users;
|
||||
} {503960}
|
||||
|
||||
do_execsql_test select-limit {
|
||||
SELECT id FROM users LIMIT 1;
|
||||
} {1}
|
||||
|
||||
Reference in New Issue
Block a user