1)This works fine.
The EQ calculation takes place in a field called Results_YearlyIncome in the Results table.
This provides a sum of income by year from the Income table that corresponds with records "Year" in the Results table.
Note that "Year" is only a number (e.g. 2018)
Round(ExecuteSQL ( "SELECT SUM (Income.Inc_YearAmtIndexed)
WHERE ? = Income.Inc_Year"
2)To find the minimum income value across all the Years I use the following calculation that looks to the Income table and is stored in the Results table in a field called Results_Minimum_Income_YearAmtIndexed.
3)Now I wish to find the Year in which the minimum income occurs in. I've tried:
ExecuteSQL ( "SELECT DISTINCT (Income.Inc_Year)
WHERE ? = Round(Min (Income.Inc_YearAmtIndexed_Total_ByYear);2) "
All that's returned is ?
I'm brand new to ExecuteSQL and have reviewed many examples. It's just not sinking in... Any help on this would be greatly appreciated.