Heres the query which is giving the issue
select * from
(select user,logdate,[in time],[out time],[worked time] from tmp_phys_table) as sr1
PIVOT
(SUM([worked time]) FOR [LOGDATE] IN ([1])) AS TMPQ
I am unable to understand what the issue is. I was doing pivot as I wanted to make the rows into columns.
I want the output in the below format. The image is the one which I had created in excel for the visualization of data for my report purposes,the same I want in sql,but I am not getting the idea for how to go about the dates hence the query which I had written and which is giving the above error
No column was specified for column 1 of 'sr1' for pivot function