How would you use SQL window functions to compute a rolling 30-day average and rank assets within each portfolio?