sno name weight date avgweight 1 aaa 100 06/07/2014 1 aaa 200 13/07/2014 200(it's a 3 sunday's avg weight) 1 aaa 300 20/07/2014
SET DATEFIRST 1; select avg(weight) from your_table group by DATEPART( dw, date)
DATEPART( dw, date)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)