Ian Grieve gives us a SQL Script To Return Functional Currencies For All Companies
SQL Script To Return Functional Currencies For All Companies | azurecurve
SQL & DataDevelopment & IntegrationMicrosoft & the GP Ecosystem
Archived post from 2015. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.