AnsweredAssumed Answered

ExecuteSQL using GROUP WITH ROLLUP or equiv.

Question asked by AndreasT on Oct 17, 2018
Latest reply on Oct 17, 2018 by AndreasT

I'm looking to produce something like a subsummary result from ExecuteSQL.

MySQL has this neat modifier for GROUP called WITH ROLLUP, that does exactly that. It doesn't look like FileMaker supports this modifier and I cannot find any documentation on it.

 

The modifier is explained here: https://dev.mysql.com/doc/refman/8.0/en/group-by-modifiers.html

 

I'm looking for a result similar to this (example taken from the MySQL page). My need is a bit more complicated with many levels of summaries, but the principle is like this with a summary line for every group. The reason for not using FileMaker's own subsummaries is that the queries are complicated.

mysql> SELECT year, SUM(profit) AS profit

       FROM sales

       GROUP BY year WITH ROLLUP;

+------+--------+

| year | profit |

+------+--------+

| 2000 |   4525 |

| 2001 |   3010 |

| NULL |   7535 |

+------+--------+

 

Anyone know of an approach to get subsummaries directly from ExecuteSQL?

Outcomes