Q: Time in Hrs or Hrs and Minutes SQL Server I need to calculate productivity.
Productivity = some count/ no of Hrs

I have time in HH:MM
For example if I take time 1 hrs 30 minutes
Productivity will be
Productivity = some count / 1.3?

OR
Productivity = some count / 1.5?


A: If you have 1 hour and 30 minutes, that is 1.5 hours.  You would want to take your calculation as: yourValue / 1.5 to get Productivity in units / Hour
You would likely want something like:
SELECT DATEPART(HOUR, @yourTime) + (DATEPART(MINUTE, @yourTime) / 60.) AS pHours;

or more fully something like this, where @Time is how long the task took:
SELECT @workAccomplished /
   (DATEPART(HOUR, @Time) + (DATEPART(MINUTE, @Time) / 60.)) AS Productivity;

If you were dividing by 1.3, you would be calculating 1 Hour and 18 minutes, as 0.3 hours = 18 minutes.

A:         declare @workaccomplished int = 240
        declare @timeworked int = (SELECT DATEDIFF(hour, '2007-05-07 09:53:01', '2007-05-08 09:53:01'))

        --datediff parameters: hour, startingtime , endtime
        declare @productivity numeric(8,4) = @workaccomplished / @timeworked

        select @productivity 

