June 28, 201510 yr 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, 201510 yr by rivet
June 29, 201510 yr 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
July 25, 201510 yr 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.
Create an account or sign in to comment