I would like to build a query that will rank the data by dates, average the values for the corresponding dates, and also show a running total (cumulative) average value. Assume the table below, and desired output examples. Can anyone show me an example SQL statement to do this?