Group by
Posted: 2022-12-09 15:55
Hello,
I have a DB that contains the names of farmers who receive inputs. I need to know which farmer receives what amount of input according to this query:
SELECT farmer.Name ,Input.input, sum(input.amount) FROM Farmer
LEFT JOIN Input ON Input.GN=Farmer.GN GROUP BY by input.input, farmer.GN
This does not to be possible with a calculated field.
I have circumvented this now by creating a view and then having a table in AppGini with the same fields as the view - which works.
Is there any wat to do this in AppGini directly?
Thanks
Thomas
I have a DB that contains the names of farmers who receive inputs. I need to know which farmer receives what amount of input according to this query:
SELECT farmer.Name ,Input.input, sum(input.amount) FROM Farmer
LEFT JOIN Input ON Input.GN=Farmer.GN GROUP BY by input.input, farmer.GN
This does not to be possible with a calculated field.
I have circumvented this now by creating a view and then having a table in AppGini with the same fields as the view - which works.
Is there any wat to do this in AppGini directly?
Thanks
Thomas