Find the actual MAX time (6/9)


People have commented that the results of the “correct” code are wonky because the cook_time and cool_down_time are actually TEXT fields from the schema table, not numeric fields. You can CAST the data elements to integer for real results.


select id, max(cast(cook_time as integer), cast(cool_down_time as integer)) 
FROM baked_goods;



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.