Level 33
Right answer would be to change column type from string "H:M" to integer seconds, getting averages and other calculations will be easy.
If you have to stick to current format, then you should extract hours/minutes strings from the field, convert to numbers and calculate minutes, something like this:
SELECT
SUBSTRING(cook_time, 1, 2) AS hours_str,
SUBSTRING(cook_time, 4, 2) AS minutes_str,
CAST(hours_str AS INTEGER) AS hours,
CAST(minutes_str AS INTEGER) AS minutes,
(hours * 60 + minutes) AS overall_minutes,
AVG(overall_minutes) AS avg_minutes,
FROM
cookings
WHERE
...
1 like