Z2Data interview question

function vs stored procedure ?