Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Group By - requires all Select fields

Featured Replies

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. 

 

SELECT
province, city, COUNT(*)
FROM
data
WHERE
province in ( 'ON', 'BC')
GROUP BY
province, city

 

RESULT:

BC, Abbotsford, 3
BC, Burnaby, 2
BC, Castlegar, 1
BC, Chilliwack, 3

 

 

ca-500.zip

Edited by rivet

  • 4 weeks later...

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.