SELECT '_recording_date' as A,
[1], [2], [3], [4], [5], [6], [7], [8], [9], [10]
FROM
(SELECT (_morning_milk+_evening_milk) as Total,_sequence
FROM _milk_yield where _cow_id='8' and _calving_det_id='6') AS SourceTable
PIVOT
(
avg(Total)
FOR _sequence IN ([1], [2], [3], [4], [5], [6], [7], [8], [9], [10])
) AS PivotTable;