rivet Posted June 28, 2015 Share Posted June 28, 2015 (edited) I thought I should post this. It seems GROUP BY in FMPs ExecuteSQL function requires all the SELECT fields to work properly where that is not the case with mySql. SELECTprovince, city, COUNT(*)FROMdataWHEREprovince in ( 'ON', 'BC')GROUP BYprovince, city RESULT: BC, Abbotsford, 3BC, Burnaby, 2BC, Castlegar, 1BC, Chilliwack, 3 … ca-500.zip Edited June 28, 2015 by rivet 1 Link to comment Share on other sites More sharing options...
mr_vodka Posted June 29, 2015 Share Posted June 29, 2015 Yeah this was in their SQL documentation albeit written cryptically. Definitely limited compared to mySQL. https://fmhelp.filemaker.com/docs/13/en/fm13_sql_reference.pdf#page=11 1 Link to comment Share on other sites More sharing options...
beverly Posted July 25, 2015 Share Posted July 25, 2015 Yes, this is true. So a SELECT *, COUNT(*) would require you to list ALL fields that might be returned in the GROUP BY (ugh!) And another reason I don't like to use "*" in the aggregates or in the SELECT at all. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 3205 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now