Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now
SELECT [Monday],[Tuesday],[Wednesday],[Thursday],[Friday],[Saturday],[Sunday] FROM ( select CD.carkey,CD.startmileage,CD.endmileage,(CD.endmileage - CD.startmileage) milesDriven,DATENAME(WEEKDAY,SU.sessionStart) _WEEKDAY from car_details CD inner join Car C on C.carKey = CD.carKey inner join Users U on U.userKey = CD.updateuser inner join SessionUnit SU on SU.sessionKey = CD.sessionKey WHERE CD.carKey = 129 and SU.sessionStart BETWEEN '11/1/2016' AND '12/1/2016' )AS T PIVOT ( avg(T.milesDriven) FOR _weekDay IN ([Monday],[Tuesday],[Wednesday],[Thursday],[Friday],[Saturday],[Sunday]) ) as piv
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|T-SQL: Trying to use a "NOT IN (Subquery)" in CASE Statement||2||30|
|Failover Cluster Primary Nodes Current Vote = 0||5||40|
|New to SQL but have been asked to set up a sql database from checklist I was provided||2||15|
Join the community of 500,000 technology professionals and ask your questions.