rivet Posted June 28, 2015 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
mr_vodka Posted June 29, 2015 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
beverly Posted July 25, 2015 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.
Recommended Posts
This topic is 3486 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