add tests

This commit is contained in:
Ihor Andrianov
2025-04-03 21:51:10 +03:00
parent 34a132fcd3
commit 5632b15a44
2 changed files with 21 additions and 0 deletions

View File

@@ -99,6 +99,27 @@ do_execsql_test select-agg-binary-unary-positive {
SELECT min(age) + +max(age) FROM users;
} {101}
do_execsql_test select-non-agg-cols-should-be-not-null {
SELECT id, first_name, sum(age) FROM users LIMIT 1;
} {1|Jamie|503960}
do_execsql_test select-with-group-by-and-agg-1 {
SELECT id, first_name, avg(age) FROM users group by last_name limit 1;
} {274|Debra|66.25}
do_execsql_test select-with-group-by-and-agg-2 {
select first_name, last_name from users where state = 'AL' group by last_name limit 10;
} {Jay|Acosta
Daniel|Adams
Aaron|Baker
Sharon|Becker
Kim|Berg
Donald|Bishop
Brian|Bradford
Jesus|Bradley
John|Brown
Hunter|Burke}
do_execsql_test select-agg-json-array {
SELECT json_group_array(name) FROM products;
} {["hat","cap","shirt","sweater","sweatshirt","shorts","jeans","sneakers","boots","coat","accessories"]}

0
testing/testing Normal file
View File