I have a spreadsheet table derived from a SQL view. I perform an ARRAY function on the table where I determine the MAX value of a column of values based on the value in another row column:
{MAX(IF( lookuprange=cellvalue,rangevalues ))}
How can write a SQL statement to emulate this function in the original view?