Hi Sai,
the difference is the ordering, ascending vs. descending :-)
#1 returns the daily_sales value of the current row, thus it's equivalent to daily_sales without any OLAP
#2 returns the minimum daily_sales of all rows for a product_id, thus it's equivalent to min(daily_sales) over(partition by product_id)
Hi Sai,
the difference is the ordering, ascending vs. descending :-)
#1 returns the daily_sales value of the current row, thus it's equivalent to daily_sales without any OLAP
#2 returns the minimum daily_sales of all rows for a product_id, thus it's equivalent to min(daily_sales) over(partition by product_id)
Dieter