how do i run a query like `SELECT SUM(column) FROM...
# help
a
how do i run a query like
SELECT SUM(column) FROM tablename
with supabase-js?
s
Copy code
js
const { count, error } = await supabase
  .from('tablename')
  .select('*', { head: true, count: 'exact' })
g
I think the question was sum (like add all the numbers in a column) versus just count how many columns
s
Ah good catch, yes you would have to create a view for this.
How to do a SUM on a table?