{[], se_lt_z :: [g-G, sum(i)-I], group_by([G])}
This will generate the GROUP BY SQL and sum se_lt_z.i for each value of se_lt_z.g
GROUP BY SQL
se_lt_z.i
se_lt_z.g