Sql sum of number column doesn't work

please all is in the image.
My column is stored as number in my google sheets database
it is stored as number in the table3 too.
what it seems i try to sum strings? is there a mistake somewhere?
thank you so much

for your help!!

SELECT SUM(CAST(prix_total_TTC_Starc AS NUMBER)) as total_starc
FROM {{table3.data}};

it works.. but the result is * total_starc:1456.6200000000001

it is complex to deal with decimal number of is there something simple i have to know? thank you.. This number is difficult to use in a reporting...

ok i used {{numberinput.value.toFixed(2)}}

Hi @Emmanuelle_S, glad to hear that you solved the problem.

In a related note, you can do the whole thing in SQL and avoid the CAST if you operate on the SQL that underlies the table3.

SELECT SUM(prix_total...) as total_starc
FROM eg inventory i INNER JOIN prices p

Removing the reference to table3 can sometimes make your code more modular and robust.

thank you @stewart.anstey but i am new at "developing" apps, and i don't know how to use inner join, all my databases are in google sheets