• Hi Erik, I would like to create a function that would give me a 'weighted average' total number * .weighting ie, silver is worth 40% of gold so silver = value_of_gold($80) * value_weighting(40%) so a simple function would look like

    select * from weightAvg(80, 40)

    but the data will be coming from a table so there will be additional columns, ie, city, retailer, month so the I would like to be able to run a function that will compute a table with different columns which will also need groupings ...