Sum and Group By in server action


I have this query:

but I don’t show SUM

Why ? @Teodor

I want show SUM of “Codice Articolo”


Please provide a link to your page.


this is a test page


Please add an alias for the SUM column and use it in the table generator then :slight_smile:


ok, it works
but it doesn’t order DESC


Sorting is not working because the column you need to sort by is totale_articolo.
Which is not accessible here in query builder.

Remove the sorting condition from query builder, and just add the column alias name in Server Connect’s sort property as below:


ok, I did as you say but does not work


I did the same and it worked for me.
See here:

Can you share a link of your page?



Two observations:

  1. There is no KEY set for the repeat expression.
  2. totale_articolo is returned as numeric, whereas in my test url, the SUM column sumal is being returned as a string. Don’t exactly know why - probably has something to do with MySQL version.
    You can see this too in the Network tab response JSON of Chrome’s dev tools.
    My DB has this column as int(11). And prepared statements in my DB connection is TRUE. MariaDB 10.2.21.