Quantcast
Channel: SCN : All Content - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 4013

Total Hours Calculation group by week in Data Services

$
0
0

I have requirement of creating  EMPLOYEE TIMESHEET HISTORY table where we have add total timesheet hours for EMPLOYEE group by week.

below is the example source data for employees having time sheet hours day wise for 3 weeks :

 

 

EMPLOYEE_CODE

DATE_TIMEBAND

ACTUAL_HOURS

1

1/01/2016

0

1

2/01/2016

0

1

3/01/2016

0

1

4/01/2016

0

1

5/01/2016

8

1

6/01/2016

8

1

7/01/2016

8

1

8/01/2016

8

1

9/01/2016

0

1

10/01/2016

0

1

11/01/2016

8

1

12/01/2016

8

1

13/01/2016

8

1

14/01/2016

8

1

15/01/2016

8

2

4/01/2016

8

2

5/01/2016

8

2

6/01/2016

8

2

7/01/2016

8

2

8/01/2016

8

2

9/01/2016

0

2

10/01/2016

0

 

 

We need the output like below:

 

EMPLOYEE_CODE

DATE_TIMEBAND(Week_Starting_Date)

TOTAL_HOURS(WEEKLY)

1

28/12/2015

0

1

4/01/2016

32

1

11/01/2016

40

2

4/01/2016

40

 

 

Please suggest any approach to solve this problem.

 

Thanks in advance for help and support


Viewing all articles
Browse latest Browse all 4013

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>