Reputation: 1121
Here is the query which i have tried.. Don't know why it is not working..
SELECT function_code,start_time,end_time,TIMEDIFF('end_time','start_time') ,total_units FROM function
Upvotes: 0
Views: 885
Reputation: 1038
Try this
SELECT function_code,start_time,end_time,TIMEDIFF(end_time,start_time) ,total_units FROM function
This should work as you have used single quote for end_time
and start_time
, TIMEDIFF
function considered it as time not the columns hence your output is not coming what you expected.
Upvotes: 5