...
Substituting those expressions in appropriate places will get you most of the way through writing this particular template. But there's still one task left that requires a bit of coding: building the list of column names for the stored procedure.