Code Select

MIN_MAX_START:

TEMP_MIN = 100

TEMP_MAX = -100

MIN_MAX_SELECT:

SQL_SATS = "SELECT TEMP FROM TEMPERATUR WHERE DATE LIKE " + $SQ + 2017% +$SQ

slSel(SQL_SATS)

MIN_MAX_READING:

IF slGetRow = 0 THEN EXIT FUNCTION

TEMP_= VAL(slFN("TEMP" ))

MIN_OCH_MAX_LAGRING:

TEMP_MAX = MAX(TEMP_MAX, TEMP)

TEMP_MIN = MIN(TEMP_MIN, TEMP)

GOTO MIN_MAX_READING

Is it possible to solve this in an SQL statement only?

/Fim