i will provide you with stub to work on:-SELECT date,name,rush_no,rush_net,isnull(rush_net/nullif(rush_no,0),0)as YPCFROM YourTableUNION ALLSELECT Year(Date),Name,SUM(rush_no),SUM(rush_net),isnull(SUM(rush_net)/nullif(SUM(rush_no),0),0)FROM YourTableGROUP BY Year(Date),Name
Hope this is what you're looking at. Likewise you can join your aggregated values along with detail and return them as single resultset toyour page.