Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles
/* SELECT OwnerUserID, [Monday] FROM (SELECT SCORE , OwnerUserID, DATENAME(weekday, CreationDate) day from Posts where OwnerUserID in (1,2,3,4,5)) p PIVOT ( SUM (SCORE ) Score FOR day In ('Monday', 'Tuesday', 'Wednessday', 'Thursday', 'Friday') ) pvt */ SELECT SCORE , OwnerUserID, DATENAME(weekday, CreationDate) day from Posts where OwnerUserID in (1,2,3,4,5)