add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
sqlite_version()
3.39.1

id amount
1 4
2 15
3 4
INT_to_TEXT
0
Casted
1
id amount SUM(amount) typeof(amount) amount = '4' typeof(sum(amount)) sum(amount) = '4' sum(amount) = '4.0' sum(amount) = 4
1 4 4 real 1 real 0 0 1
2 15 15 real 0 real 0 0 0
3 4 4 real 1 real 0 0 1
Int Coerced
1 1
0 0
1 1
The sum (INT) Expected No coercion 1 Casted No coercion 2
4 1 0 1 0
15 0 0 0 0
4 1 0 1 0
COUNT(*) = 3 COUNT(*) = '3' MAX(amount) = 15 MAX(amount) = 15 -- <<---- But, MAX() does not!
1 0 1 1