Calculating the Year to Date SUM based on a Date column

Hello, I have this code, and it seems close, but it's not quite there. Essentially, I want to SUM everything from the beginning of the year found in [Incident_Date] up until the actual date that's in the [Incident_Date] column.

SUM(CASE WHEN [Recordable_Injury] IS NOT NULL AND ([Incident_Date] >= DATEFROMPARTS(YEAR([Incident_Date]),1,1) AND [Incident_Date] <= [Incident_Date]) THEN 1 ELSE 0 END) AS [RIF],

You say that you want a SUM but the only possible values you appear to be summing are a 1 or a 0 based on your condition. That sounds a lot more like a "count" although I understand the need for the SUM to do such a thing here.

We really need to see the rest of your query because the related GROUP BY that must be present is important here.

hi what does this mean ?

what are you trying to do

([Incident_Date] >= DATEFROMPARTS(YEAR([Incident_Date]),1,1) AND [Incident_Date] <= [Incident_Date]) THEN 1 ELSE 0 END)

Thank you to you both for responding. I'll attempt to provide a little more clarification. This image displays, in essence, what I've already got accomplished.

Basically, if Recordable_Injury column is not empty, it get recorded as a 1 in the RIF column. If Recordable_Injury contains either "Lost Time" or "Fatality", it gets recorded as a 1 in the LTIR column, and finally, if PSET1_2 is not empty it gets recorded as a 1 in the PSER column.

These results are grouped by 1) the first day of the month for 2) each Operating_Area.

My sql Create View code adds additional groupings to the Operating_Area column. Essentially, AreaA and AreaB, for example could be a part of Group A and, or Group B etc.

Finally harishgg1, what I'm trying to do is get a growing number each month until the end of each year, for each operating_Area. If there were 2 RIFs in January and 3 in February, I'll see 5 beside 02/01/2022 (for that particular Operating_Area)

Here is the code I'm using. Again, it's repeated quite a bit for the different groups.

CREATE VIEW [dbo].[EHS_Reporting_Records_Count_Combined]
AS

SELECT 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1) AS [Date],
    [Operating_Area],
    COUNT(CASE WHEN [Recordable_Injury] IS NOT NULL THEN 1 END) AS [RIF],
    COUNT(CASE WHEN [Recordable_Injury] IN ('Lost Time', 'Fatality') THEN 1 END) AS [LTIR],
    COUNT(CASE WHEN [PSET1_2] IS NOT NULL THEN 1 END) AS [PSER]
FROM [dbo].[EHS_Reporting_Records]
GROUP BY 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1),
    [Operating_Area]


--Group A
UNION ALL

SELECT 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1) AS [Date],
    'Group A' AS [Operating_Area],
    COUNT(CASE WHEN [Recordable_Injury] IS NOT NULL THEN 1 END) AS [RIF],
    COUNT(CASE WHEN [Recordable_Injury] IN ('Lost Time', 'Fatality') THEN 1 END) AS [LTIR],
    COUNT(CASE WHEN [PSET1_2] IS NOT NULL THEN 1 END) AS [PSER]
FROM [dbo].[EHS_Reporting_Records]
WHERE [Operating_Area] IN ('AreaA', 'AreaC', 'AreaD', 'AreaE', 'AreaF', 'AreaG', 'AreaB', 'AreaH', 'AreaI', 'AreaJ', 'AreaK')
GROUP BY 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1)


--Group B
UNION ALL

SELECT 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1) AS [Date],
    'Group B' AS [Operating_Area],
    COUNT(CASE WHEN [Recordable_Injury] IS NOT NULL THEN 1 END) AS [RIF],
    COUNT(CASE WHEN [Recordable_Injury] IN ('Lost Time', 'Fatality') THEN 1 END) AS [LTIR],
    COUNT(CASE WHEN [PSET1_2] IS NOT NULL THEN 1 END) AS [PSER]
FROM [dbo].[EHS_Reporting_Records]
WHERE [Operating_Area] IN ('AreaA', 'AreaC', 'AreaD', 'AreaE', 'AreaF', 'AreaG', 'AreaB', 'AreaH', 'AreaJ', 'AreaK')
GROUP BY 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1)


--Group C
UNION ALL

SELECT 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1) AS [Date],
    'Group C' AS [Operating_Area],
    COUNT(CASE WHEN [Recordable_Injury] IS NOT NULL THEN 1 END) AS [RIF],
    COUNT(CASE WHEN [Recordable_Injury] IN ('Lost Time', 'Fatality') THEN 1 END) AS [LTIR],
    COUNT(CASE WHEN [PSET1_2] IS NOT NULL THEN 1 END) AS [PSER]
FROM [dbo].[EHS_Reporting_Records]
WHERE [Operating_Area] IN ('AreaC', 'AreaD', 'AreaE', 'AreaG', 'AreaH', 'AreaJ', 'AreaK')
GROUP BY 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1)


--Group D
UNION ALL

SELECT 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1) AS [Date],
    'Group D' AS [Operating_Area],
    COUNT(CASE WHEN [Recordable_Injury] IS NOT NULL THEN 1 END) AS [RIF],
    COUNT(CASE WHEN [Recordable_Injury] IN ('Lost Time', 'Fatality') THEN 1 END) AS [LTIR],
    COUNT(CASE WHEN [PSET1_2] IS NOT NULL THEN 1 END) AS [PSER]
FROM [dbo].[EHS_Reporting_Records]
WHERE [Operating_Area] IN ('AreaC', 'AreaD', 'AreaE', 'AreaG', 'AreaH', 'AreaK')
GROUP BY 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1)


--Group F
UNION ALL

SELECT 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1) AS [Date],
    'Group F' AS [Operating_Area],
    COUNT(CASE WHEN [Recordable_Injury] IS NOT NULL THEN 1 END) AS [RIF],
    COUNT(CASE WHEN [Recordable_Injury] IN ('Lost Time', 'Fatality') THEN 1 END) AS [LTIR],
    COUNT(CASE WHEN [PSET1_2] IS NOT NULL THEN 1 END) AS [PSER]
FROM [dbo].[EHS_Reporting_Records]
WHERE [Operating_Area] IN ('AreaA', 'AreaF', 'AreaB')
GROUP BY 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1)


--Group E
UNION ALL

SELECT 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1) AS [Date],
    'Group E' AS [Operating_Area],
    COUNT(CASE WHEN [Recordable_Injury] IS NOT NULL THEN 1 END) AS [RIF],
    COUNT(CASE WHEN [Recordable_Injury] IN ('Lost Time', 'Fatality') THEN 1 END) AS [LTIR],
    COUNT(CASE WHEN [PSET1_2] IS NOT NULL THEN 1 END) AS [PSER]
FROM [dbo].[EHS_Reporting_Records]
WHERE [Operating_Area] IN ('AreaA', 'AreaB')
GROUP BY 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1)

hi

i tried to simplify it

hope this helps

; WITH cte AS 
(
SELECT 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1)
  , case WHEN Operating_Area in ('AreaA', 'AreaC', 'AreaD', 'AreaE', 'AreaF', 'AreaG', 'AreaB', 'AreaH', 'AreaI', 'AreaJ', 'AreaK') then 'Group A'
         WHEN Operating_Area in ('AreaA', 'AreaC', 'AreaD', 'AreaE', 'AreaF', 'AreaG', 'AreaB', 'AreaH', 'AreaJ', 'AreaK')          then 'Group B'
		 WHEN Operating_Area in ('AreaC', 'AreaD', 'AreaE', 'AreaG', 'AreaH', 'AreaJ', 'AreaK')                                     then 'Group C'
		 WHEN Operating_Area in ('AreaC', 'AreaD', 'AreaE', 'AreaG', 'AreaH', 'AreaK')                                              then 'Group D' 
		 WHEN Operating_Area in ('AreaA', 'AreaB')                                                                                  then 'Group E' 
		 WHEN Operating_Area in ('AreaA', 'AreaF', 'AreaB')                                                                         then 'Group F' 
		 WHEN Operating_Area  = Operating_Area                                                                                      then 'Operating Area' 
	end AS Group
  ,  CASE WHEN [Recordable_Injury] IS NOT NULL THEN 1 ELSE 0 END AS [RIF],
  ,  CASE WHEN [Recordable_Injury] IN ('Lost Time', 'Fatality') THEN 1 ELSE 0 END AS [LTIR],
  ,  CASE WHEN [PSET1_2] IS NOT NULL THEN 1 ELSE 0 END AS [PSER]
FROM 
   [dbo].[EHS_Reporting_Records]
) 
SELECT 
     [Date] 
   , [Group]
   , sum([RIF]) as [RIF]
   , sum([LITR]) as [LITR]
   , sum([PSER]) as [PSER]
FROM 
    CTE 
GROUP BY
     [Date] 
   , [Group]
ORDER BY 
     [Date] 
   , [Group]

Thank you so much for doing this, wow. Unfortunately, I think there's a couple errors, and likely some unknowns on my end. If you don't mind, a few things.

  1. I'm trying to run this query and create a view. You start it with "; WITH cte AS". Can I not use my "CREATE VIEW [dbo].[EHS_Reporting_Records_Count_Combined_New] AS"?

  2. In your lower SELECT you have LITR instead of LTIR. No biggie obviously

  3. in the CASE lines there appear to be additional commas, which I've removed on my end.

  4. In your lower SELECT portion I see you have [Date] and [Group]. Should these be [Incident_Date] and [Operating_Area] ? I'm so new at this, I don't exactly know what these steps are doing, so I wonder.

Finally, it's giving me a syntax error near your lower SELECT, though I could have messed it up.

hi

im my script

i have made it a view

i have made the LITR to LTIR

case lines addtional commas .. i dont see where ?? it looks good

Lower Select .. i made the changes .. to [Incident_Date] and [Operating_Area]

CREATE VIEW [dbo].[EHS_Reporting_Records_Count_Combined_New] 
AS
WITH cte AS 
(
SELECT 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1) AS [Incident_Date]
  , case WHEN Operating_Area in ('AreaA', 'AreaC', 'AreaD', 'AreaE', 'AreaF', 'AreaG', 'AreaB', 'AreaH', 'AreaI', 'AreaJ', 'AreaK') then 'Group A'
         WHEN Operating_Area in ('AreaA', 'AreaC', 'AreaD', 'AreaE', 'AreaF', 'AreaG', 'AreaB', 'AreaH', 'AreaJ', 'AreaK')          then 'Group B'
		 WHEN Operating_Area in ('AreaC', 'AreaD', 'AreaE', 'AreaG', 'AreaH', 'AreaJ', 'AreaK')                                     then 'Group C'
		 WHEN Operating_Area in ('AreaC', 'AreaD', 'AreaE', 'AreaG', 'AreaH', 'AreaK')                                              then 'Group D' 
		 WHEN Operating_Area in ('AreaA', 'AreaB')                                                                                  then 'Group E' 
		 WHEN Operating_Area in ('AreaA', 'AreaF', 'AreaB')                                                                         then 'Group F' 
		 WHEN Operating_Area  = Operating_Area                                                                                      then 'Operating Area' 
	end AS Operating_Area
  ,  CASE WHEN [Recordable_Injury] IS NOT NULL THEN 1 ELSE 0 END AS [RIF],
  ,  CASE WHEN [Recordable_Injury] IN ('Lost Time', 'Fatality') THEN 1 ELSE 0 END AS [LTIR],
  ,  CASE WHEN [PSET1_2] IS NOT NULL THEN 1 ELSE 0 END AS [PSER]
FROM 
   [dbo].[EHS_Reporting_Records]
) 
SELECT 
     [Incident_Date] 
   , [Operating_Area]
   , sum([RIF]) as [RIF]
   , sum([LTIR]) as [LTIR]
   , sum([PSER]) as [PSER]
FROM 
    CTE 
GROUP BY
     [Incident_Date] 
   , [Operating_Area]
ORDER BY 
     [Incident_Date] 
   , [Operating_Area]

Thank you again for your response. Here are the commas I'm referring to:

If I remove the right two commas, it seems to clear up the errors there. With that said, now when I run the query, I get the response:

Msg 1033, Level 15, State 1, Procedure EHS_Reporting_Records_Count_Combined_New, Line 35 [Batch Start Line 0]
The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP, OFFSET or FOR XML is also specified.

Completion time: 2023-02-23T13:39:27.0578914-04:00

hi

please try this

CREATE VIEW [dbo].[EHS_Reporting_Records_Count_Combined_New] 
AS
WITH cte AS 
(
SELECT 
    DATEFROMPARTS(YEAR([Incident_Date]), MONTH([Incident_Date]), 1) AS [Incident_Date]
  , case WHEN Operating_Area in ('AreaA', 'AreaC', 'AreaD', 'AreaE', 'AreaF', 'AreaG', 'AreaB', 'AreaH', 'AreaI', 'AreaJ', 'AreaK') then 'Group A'
         WHEN Operating_Area in ('AreaA', 'AreaC', 'AreaD', 'AreaE', 'AreaF', 'AreaG', 'AreaB', 'AreaH', 'AreaJ', 'AreaK')          then 'Group B'
		 WHEN Operating_Area in ('AreaC', 'AreaD', 'AreaE', 'AreaG', 'AreaH', 'AreaJ', 'AreaK')                                     then 'Group C'
		 WHEN Operating_Area in ('AreaC', 'AreaD', 'AreaE', 'AreaG', 'AreaH', 'AreaK')                                              then 'Group D' 
		 WHEN Operating_Area in ('AreaA', 'AreaB')                                                                                  then 'Group E' 
		 WHEN Operating_Area in ('AreaA', 'AreaF', 'AreaB')                                                                         then 'Group F' 
		 WHEN Operating_Area  = Operating_Area                                                                                      then 'Operating Area' 
	end AS Operating_Area
  ,  CASE WHEN [Recordable_Injury] IS NOT NULL THEN 1 ELSE 0 END AS [RIF]
  ,  CASE WHEN [Recordable_Injury] IN ('Lost Time', 'Fatality') THEN 1 ELSE 0 END AS [LTIR]
  ,  CASE WHEN [PSET1_2] IS NOT NULL THEN 1 ELSE 0 END AS [PSER]
FROM 
   [dbo].[EHS_Reporting_Records]
) 
SELECT 
     [Incident_Date] 
   , [Operating_Area]
   , sum([RIF]) as [RIF]
   , sum([LTIR]) as [LTIR]
   , sum([PSER]) as [PSER]
FROM 
    CTE 
GROUP BY
     [Incident_Date] 
   , [Operating_Area]

I'm afraid this code didn't come out as intended. It did execute without error, however the results were not correct.
Interestingly, the Operating area was only Group A. None of the other Operating_Areas or Groups were listed. Secondly, unfortunately it did not total as the year went on. They appear to just be monthly totals still.
image

In the RIF column, for Group A in this instance, according to the attached picture, the value for 2022-12-01 should be 54. The value for 2022-11-01 should be 49 and so on.

hi

for this

i need sample data

can you please provide sample data in the form of create table insert data statements

That's totally understandable. I have manipulated my data and changed dates and records so they don't actually reflect my information any longer. At the very least, you'll have some information you can use for testing. Thank you again for your help with this.

https //docs google com/spreadsheets/d/1E4Fv2nmsnG9kWrs_7q6MTBKktGnWZ7De/edit?usp=share_link&ouid=117824618729282791896&rtpof=true&sd=true

hi

i am not able to open that link

I think you'll need to copy and paste, add a : after https and . after docs and google. I'm not sure how else to get data to you

tried but not able to open

i could try creating my own sample data ... which will be very small ..but to see what's happening

Is it giving you an error message in google Drive?

its not opening anything in the browser

I could email it to you if you felt like it

Incident_Date Operating_Area Recordable_Injury PSET1_2
9/16/2019 AreaC Medical Aid NULL
3/27/2022 AreaB NULL PSET2
10/17/2019 AreaC Medical Aid NULL
3/15/2022 AreaC Medical Aid NULL
5/4/2018 AreaC Medical Aid NULL
10/13/2018 AreaC Medical Aid NULL
5/17/2021 AreaC Medical Aid NULL
4/27/2017 AreaC Medical Aid NULL
5/10/2019 AreaC Medical Aid NULL
6/6/2019 AreaC Medical Aid NULL
12/21/2018 AreaC Medical Aid NULL
3/12/2022 AreaC Lost Time NULL
1/8/2017 AreaC Medical Aid NULL
11/5/2016 AreaC Medical Aid NULL
7/27/2017 AreaC Medical Aid NULL
7/4/2022 AreaC Modified Duty NULL
7/3/2021 AreaC Modified Duty NULL
8/12/2020 AreaC Fatality NULL
3/19/2021 AreaC Lost Time NULL
3/23/2016 AreaC Lost Time NULL
3/14/2021 AreaA NULL PSET1
3/24/2016 AreaA NULL PSET1
3/3/2018 AreaA Modified Duty NULL
2/28/2020 AreaA NULL PSET1
2/18/2022 AreaA Modified Duty NULL
5/12/2020 AreaD Modified Duty NULL
3/26/2016 AreaC Modified Duty NULL
9/18/2019 AreaE Medical Aid NULL
1/24/2022 AreaE Modified Duty NULL
11/6/2021 AreaC Medical Aid NULL
2/24/2022 AreaF Lost Time NULL
5/26/2017 AreaA NULL PSET1
1/9/2019 AreaA Medical Aid NULL
9/5/2021 AreaA Modified Duty NULL
3/12/2016 AreaA Modified Duty NULL
3/26/2018 AreaC Lost Time NULL
3/23/2020 AreaC Medical Aid NULL
1/19/2021 AreaA NULL PSET1
1/30/2022 AreaA Modified Duty NULL
4/23/2017 AreaC Medical Aid NULL
10/15/2020 AreaA Lost Time NULL
4/18/2022 AreaC Medical Aid NULL
2/21/2020 AreaC Lost Time NULL
4/15/2021 AreaC Lost Time NULL
1/5/2018 AreaC Medical Aid NULL
8/5/2017 AreaA Modified Duty NULL
12/27/2022 AreaG Medical Aid NULL
8/9/2022 AreaC Medical Aid NULL
10/30/2018 AreaH Medical Aid NULL
10/20/2020 AreaA Modified Duty NULL
5/27/2018 AreaE Medical Aid NULL
4/12/2019 AreaE Lost Time NULL
6/22/2018 AreaC Medical Aid NULL
4/2/2021 AreaE Medical Aid NULL
12/6/2019 AreaA NULL PSET1
3/25/2019 AreaC Lost Time NULL
11/24/2021 AreaA Lost Time NULL
9/17/2018 AreaA Modified Duty NULL
4/13/2020 AreaC Medical Aid NULL
3/21/2019 AreaA NULL PSET2
6/13/2019 AreaA NULL PSET1
1/8/2017 AreaA Modified Duty NULL
3/28/2017 AreaA NULL PSET2
3/7/2016 AreaA Lost Time NULL
11/20/2021 AreaA NULL PSET1
5/8/2019 AreaA NULL PSET1
3/26/2017 AreaF NULL PSET2
2/1/2021 AreaF Lost Time NULL
7/9/2021 AreaD Modified Duty NULL
5/1/2021 AreaE Medical Aid NULL
5/21/2016 AreaA NULL PSET2
8/17/2018 AreaA NULL PSET2
10/31/2021 AreaE Medical Aid NULL
12/5/2018 AreaA Modified Duty NULL
4/5/2019 AreaA Lost Time NULL
1/15/2021 AreaI Medical Aid NULL
4/16/2022 AreaA NULL PSET1
1/19/2018 AreaA Lost Time NULL
9/14/2022 AreaA Medical Aid NULL
8/10/2020 AreaA Medical Aid NULL
7/25/2017 AreaA Lost Time NULL
8/21/2020 AreaE Medical Aid NULL
3/21/2019 AreaA Lost Time NULL
11/22/2019 AreaA Lost Time NULL
12/27/2017 AreaA Lost Time NULL
7/17/2022 AreaA Modified Duty NULL
4/19/2019 AreaC Lost Time NULL
1/26/2018 AreaC Medical Aid NULL
4/8/2021 AreaD Modified Duty NULL
7/21/2020 AreaA Modified Duty NULL
3/9/2021 AreaC Medical Aid NULL
10/31/2016 AreaH Medical Aid NULL
6/20/2018 AreaH Lost Time NULL
11/24/2021 AreaC Medical Aid NULL
5/15/2021 AreaC Lost Time NULL
12/7/2016 AreaA Medical Aid NULL
12/8/2018 AreaA NULL PSET2
2/5/2017 AreaA Modified Duty NULL
5/10/2018 AreaC Medical Aid NULL
1/15/2020 AreaE Medical Aid NULL
5/4/2019 AreaA Modified Duty NULL
7/13/2019 AreaC Medical Aid NULL
2/21/2020 AreaF Lost Time NULL
5/16/2018 AreaA Lost Time NULL
7/3/2017 AreaA NULL PSET2
9/27/2017 AreaF Lost Time NULL
2/4/2018 AreaC Medical Aid NULL
3/20/2020 AreaE Medical Aid NULL
6/17/2021 AreaA Modified Duty NULL
6/25/2022 AreaA NULL PSET1
1/23/2020 AreaC Lost Time NULL
12/15/2021 AreaC Medical Aid NULL
8/18/2019 AreaD Modified Duty NULL
2/25/2016 AreaA Medical Aid NULL
8/29/2017 AreaA Medical Aid NULL
5/25/2018 AreaA NULL PSET2
12/12/2016 AreaC Medical Aid NULL
11/27/2022 AreaE Medical Aid NULL
1/4/2019 AreaA NULL PSET1
3/15/2017 AreaE Medical Aid NULL
4/3/2016 AreaA NULL PSET2
2/23/2022 AreaG Medical Aid NULL
11/26/2019 AreaC Medical Aid NULL
11/2/2020 AreaA NULL PSET2
10/15/2019 AreaA NULL PSET1
4/30/2016 AreaE Modified Duty NULL
5/9/2020 AreaC Medical Aid NULL
9/24/2016 AreaC Medical Aid PSET1
11/27/2019 AreaC Medical Aid NULL
11/9/2017 AreaA Lost Time NULL
2/25/2020 AreaC NULL PSET1
5/22/2016 AreaA NULL PSET2
3/6/2016 AreaA Lost Time NULL
7/31/2021 AreaC Medical Aid NULL
11/8/2016 AreaA Lost Time NULL
2/4/2016 AreaC Medical Aid NULL
9/22/2016 AreaA Modified Duty NULL
8/22/2022 AreaA Medical Aid NULL
1/27/2017 AreaA Modified Duty NULL
7/10/2022 AreaC Medical Aid NULL
1/27/2018 AreaA NULL PSET2
1/12/2022 AreaA Modified Duty NULL
7/20/2021 AreaA NULL PSET2
4/16/2021 AreaA NULL PSET2
3/4/2019 AreaA NULL PSET2
2/15/2016 AreaA Modified Duty NULL
8/5/2022 AreaC NULL PSET1
2/24/2021 AreaA Modified Duty NULL
12/31/2020 AreaC Medical Aid NULL
9/4/2021 AreaA Lost Time NULL
11/17/2020 AreaF Modified Duty NULL
11/4/2020 AreaA NULL PSET2
3/24/2022 AreaA NULL PSET1
6/20/2019 AreaA NULL PSET2
12/16/2022 AreaC Medical Aid NULL
10/15/2022 AreaG Medical Aid NULL
9/3/2019 AreaB Medical Aid NULL
3/21/2022 AreaA Lost Time NULL
12/16/2018 AreaC Medical Aid NULL
1/15/2020 AreaA Lost Time NULL
10/24/2018 AreaB Medical Aid NULL
10/21/2017 AreaC Lost Time NULL
4/17/2019 AreaD Lost Time NULL
4/6/2019 AreaE Medical Aid NULL
7/15/2016 AreaA NULL PSET2
8/30/2018 AreaC Medical Aid NULL
12/21/2016 AreaA Lost Time NULL
7/19/2019 AreaA Medical Aid NULL
10/8/2016 AreaA Lost Time NULL
11/30/2020 AreaA Modified Duty NULL
8/2/2019 AreaA Medical Aid NULL
4/14/2017 AreaA NULL PSET1
9/5/2019 AreaA Lost Time NULL
11/12/2019 AreaA Lost Time NULL
6/2/2018 AreaA Modified Duty NULL
1/13/2016 AreaA Medical Aid NULL
3/28/2018 AreaA Medical Aid NULL
5/8/2020 AreaA Lost Time NULL
8/25/2020 AreaA Lost Time NULL
9/20/2020 AreaA Modified Duty NULL
3/26/2020 AreaC Medical Aid NULL
4/27/2016 AreaA NULL PSET2
2/11/2017 AreaA Lost Time NULL
12/19/2021 AreaA Modified Duty NULL
11/7/2017 AreaA Lost Time NULL
12/26/2016 AreaC Medical Aid NULL
12/7/2018 AreaA Modified Duty NULL
10/31/2016 AreaA Lost Time NULL
9/12/2019 AreaE Medical Aid NULL
3/4/2021 AreaB NULL PSET2
4/20/2018 AreaA Modified Duty NULL
10/13/2021 AreaA NULL PSET2
4/15/2018 AreaB NULL PSET2
6/7/2017 AreaC Medical Aid NULL
8/19/2020 AreaA NULL PSET2
5/18/2016 AreaF NULL PSET2
8/1/2020 AreaA Modified Duty NULL
5/19/2016 AreaA Medical Aid PSET1
5/16/2021 AreaA Lost Time NULL
8/25/2019 AreaA Modified Duty NULL
4/17/2017 AreaC Medical Aid NULL
1/24/2022 AreaA Medical Aid NULL
12/1/2020 AreaA NULL PSET2
3/4/2016 AreaA NULL PSET1
7/14/2017 AreaA Modified Duty NULL
5/22/2016 AreaC Medical Aid NULL
8/9/2018 AreaA Lost Time NULL
1/22/2021 AreaA Lost Time NULL
7/3/2018 AreaB Medical Aid NULL
3/3/2018 AreaA NULL PSET1
12/29/2019 AreaB Modified Duty NULL
12/29/2018 AreaC Lost Time NULL
4/27/2016 AreaA Lost Time NULL
7/26/2021 AreaA Medical Aid NULL
10/6/2022 AreaE Medical Aid NULL
12/3/2017 AreaE Medical Aid NULL
11/18/2020 AreaC Medical Aid NULL
1/19/2020 AreaE Medical Aid NULL
1/28/2022 AreaA Lost Time NULL
8/17/2019 AreaA Lost Time NULL
12/25/2018 AreaA NULL PSET1
7/22/2020 AreaC Medical Aid NULL
4/2/2021 AreaA NULL PSET2
8/28/2017 AreaC Lost Time NULL
1/1/2018 AreaI Lost Time NULL
3/30/2021 AreaC Medical Aid NULL
9/1/2021 AreaA NULL PSET2
4/29/2022 AreaC Lost Time NULL
8/31/2017 AreaC Medical Aid NULL
10/5/2016 AreaI Medical Aid NULL
1/29/2021 AreaA Lost Time NULL
8/7/2022 AreaA Modified Duty NULL
6/19/2019 AreaA NULL PSET1
10/26/2017 AreaC Medical Aid NULL
7/15/2022 AreaA Lost Time NULL
9/4/2019 AreaB NULL PSET1
6/27/2021 AreaA Modified Duty NULL
2/15/2020 AreaC Medical Aid NULL
10/3/2022 AreaA NULL PSET2
5/31/2016 AreaC Medical Aid NULL
5/4/2020 AreaI Medical Aid NULL
3/1/2020 AreaA Lost Time NULL
3/16/2018 AreaC Lost Time NULL
6/13/2020 AreaE Lost Time NULL
2/15/2021 AreaA Lost Time NULL
2/22/2016 AreaC Lost Time NULL
2/26/2019 AreaA NULL PSET2
4/29/2019 AreaA NULL PSET2
11/10/2016 AreaE NULL PSET2
8/27/2022 AreaC Lost Time NULL
8/6/2019 AreaA Lost Time NULL
10/22/2022 AreaA NULL PSET1
8/27/2022 AreaA Lost Time NULL
12/28/2017 AreaC Medical Aid NULL
2/2/2018 AreaA Medical Aid NULL
2/15/2020 AreaB Medical Aid NULL
9/29/2020 AreaI Medical Aid NULL
4/5/2022 AreaA Medical Aid NULL
10/19/2022 AreaC Lost Time NULL
11/2/2021 AreaC Lost Time NULL
6/25/2021 AreaB NULL PSET1
9/11/2021 AreaB Lost Time NULL
2/14/2020 AreaA NULL PSET2
9/16/2017 AreaA NULL PSET2
2/19/2020 AreaC Lost Time NULL
12/16/2017 AreaA Lost Time NULL
4/1/2021 AreaB NULL PSET2
4/27/2019 AreaC Medical Aid NULL
12/23/2020 AreaA Medical Aid NULL
11/25/2018 AreaA Modified Duty NULL
5/29/2019 AreaA NULL PSET2
7/11/2019 AreaA Medical Aid NULL
9/15/2018 AreaF NULL PSET2
9/30/2021 AreaA NULL PSET1
10/3/2016 AreaB Lost Time NULL
5/2/2022 AreaA NULL PSET2
10/18/2019 AreaA Modified Duty NULL
7/6/2016 AreaD Medical Aid NULL
11/15/2017 AreaA NULL PSET2
9/23/2022 AreaC Lost Time NULL
7/6/2022 AreaA NULL PSET2
12/16/2017 AreaC Lost Time NULL
2/5/2021 AreaC Lost Time NULL
9/10/2020 AreaA Lost Time NULL
8/10/2016 AreaC NULL PSET1
3/18/2019 AreaA NULL PSET1
10/23/2017 AreaA NULL PSET2
3/14/2016 AreaA NULL PSET2
9/26/2016 AreaA Lost Time NULL
6/10/2017 AreaA Lost Time NULL
1/14/2018 AreaC Medical Aid NULL
8/26/2018 AreaC Medical Aid NULL
11/10/2017 AreaB Modified Duty NULL
6/30/2016 AreaC Lost Time NULL
12/23/2021 AreaC Medical Aid NULL
2/16/2016 AreaC Lost Time NULL
3/20/2022 AreaC Lost Time NULL
2/22/2019 AreaA NULL PSET2
4/16/2021 AreaC Medical Aid NULL
3/22/2017 AreaC Medical Aid NULL
7/30/2022 AreaA NULL PSET2
9/5/2017 AreaB Modified Duty NULL
9/18/2018 AreaB NULL PSET2
12/1/2021 AreaC Modified Duty NULL
8/5/2016 AreaA NULL PSET2
1/24/2022 AreaC NULL PSET2
10/18/2022 AreaA Lost Time NULL
5/7/2018 AreaC Medical Aid NULL
1/30/2021 AreaC Medical Aid NULL
8/23/2017 AreaA Lost Time NULL
4/19/2019 AreaH Medical Aid NULL
1/5/2022 AreaD Medical Aid NULL
7/5/2016 AreaA NULL PSET2
6/16/2020 AreaA Lost Time NULL
12/24/2022 AreaA Lost Time NULL
9/18/2016 AreaE Medical Aid NULL
7/3/2021 AreaA NULL PSET1
6/12/2016 AreaC Lost Time NULL
5/31/2018 AreaC Lost Time NULL
12/27/2018 AreaA Lost Time NULL
8/27/2016 AreaB Lost Time NULL
7/2/2017 AreaA Medical Aid NULL
3/21/2017 AreaA NULL PSET1
9/1/2017 AreaB Medical Aid NULL
8/18/2021 AreaC Lost Time NULL
8/19/2022 AreaC Lost Time NULL
6/9/2020 AreaC NULL PSET1
5/25/2020 AreaC Lost Time NULL
12/25/2016 AreaC Medical Aid NULL
10/17/2021 AreaF Medical Aid NULL
8/24/2016 AreaD Medical Aid NULL
7/21/2016 AreaC Medical Aid NULL
12/11/2021 AreaA NULL PSET1
11/3/2018 AreaC Medical Aid NULL
7/28/2021 AreaI Medical Aid NULL
1/12/2021 AreaA NULL PSET2
5/8/2018 AreaC Lost Time NULL
8/12/2019 AreaE Medical Aid NULL
12/13/2020 AreaC Lost Time NULL
6/19/2016 AreaC Medical Aid NULL
9/25/2022 AreaC Medical Aid NULL
1/29/2017 AreaC Lost Time NULL
5/3/2019 AreaC Medical Aid NULL
1/3/2018 AreaC Medical Aid NULL
12/31/2022 AreaC Medical Aid NULL
3/30/2022 AreaC Medical Aid NULL
7/29/2019 AreaC Medical Aid NULL
7/28/2018 AreaE NULL PSET2
12/31/2018 AreaH Medical Aid NULL
2/2/2021 AreaC Medical Aid NULL
9/14/2017 AreaC Medical Aid NULL
10/25/2017 AreaB Modified Duty NULL
1/17/2020 AreaA Medical Aid NULL
7/2/2022 AreaB NULL NULL
2/10/2020 AreaA NULL PSET2
7/21/2022 AreaA Lost Time NULL
3/15/2022 AreaA NULL PSET2
9/18/2022 AreaA Medical Aid NULL
11/11/2022 AreaA Lost Time NULL
5/11/2017 AreaC NULL PSET2
1/6/2019 AreaF Medical Aid NULL
3/27/2022 AreaA NULL PSET2
1/16/2021 AreaC Medical Aid NULL
1/29/2016 AreaE NULL PSET2
5/5/2018 AreaC Medical Aid NULL
9/25/2021 AreaC Medical Aid NULL
9/16/2022 AreaA Lost Time NULL
5/26/2016 AreaA Lost Time NULL
7/21/2016 AreaB NULL NULL
12/30/2020 AreaA NULL PSET1
2/5/2016 AreaC Medical Aid NULL
5/4/2016 AreaA Lost Time NULL
2/5/2019 AreaA Lost Time NULL
8/3/2020 AreaB NULL NULL
6/25/2021 AreaH Lost Time NULL
3/4/2022 AreaB Lost Time NULL
9/30/2020 AreaC Medical Aid NULL
7/24/2017 AreaA Lost Time NULL
10/8/2018 AreaE NULL PSET2
12/26/2016 AreaA NULL PSET2
5/3/2021 AreaB NULL NULL
6/1/2021 AreaC Medical Aid NULL
11/29/2021 AreaC Medical Aid NULL
8/8/2022 AreaB NULL NULL
4/29/2016 AreaC Medical Aid NULL
9/2/2020 AreaC Medical Aid NULL
12/26/2016 AreaC Medical Aid NULL
11/5/2020 AreaA NULL PSET1
3/27/2022 AreaC Medical Aid NULL
8/23/2018 AreaI Medical Aid NULL
9/13/2018 AreaC Medical Aid NULL
6/21/2022 AreaA NULL PSET1
4/12/2016 AreaC Medical Aid NULL
8/25/2021 AreaA NULL PSET1
10/20/2017 AreaC NULL PSET2
7/30/2016 AreaE Medical Aid NULL
10/10/2018 AreaC Medical Aid NULL
12/20/2017 AreaC Lost Time NULL
3/26/2020 AreaA Medical Aid NULL
7/4/2022 AreaB NULL NULL
9/25/2022 AreaC Medical Aid NULL
1/31/2018 AreaC NULL PSET2
12/29/2018 AreaB NULL NULL
6/28/2018 AreaC Lost Time NULL
4/16/2019 AreaA Lost Time NULL
2/4/2018 AreaC Lost Time NULL
7/24/2016 AreaE Medical Aid NULL
11/24/2019 AreaB NULL NULL
3/23/2020 AreaC Medical Aid NULL
3/4/2017 AreaA Lost Time NULL
2/14/2017 AreaC Lost Time NULL
8/7/2020 AreaH Lost Time NULL
9/6/2017 AreaA NULL PSET1
12/3/2021 AreaA NULL PSET2
6/23/2019 AreaC Lost Time NULL
9/19/2020 AreaB Medical Aid NULL
9/11/2018 AreaC Lost Time NULL
9/21/2020 AreaB NULL NULL
12/31/2018 AreaF Medical Aid NULL
1/8/2016 AreaC Medical Aid NULL
1/28/2022 AreaA Medical Aid NULL
10/6/2020 AreaA Lost Time NULL
10/11/2017 AreaA Lost Time NULL
12/23/2016 AreaC Medical Aid NULL
11/9/2020 AreaC Medical Aid NULL
5/20/2016 AreaA Lost Time NULL
9/10/2022 AreaG Medical Aid NULL
7/5/2016 AreaC Medical Aid NULL
6/20/2018 AreaA NULL PSET2
8/20/2017 AreaB Medical Aid NULL
4/23/2022 AreaC Lost Time NULL
5/15/2016 AreaC Lost Time NULL
1/22/2018 AreaC Medical Aid NULL
2/11/2017 AreaG Medical Aid NULL
12/26/2022 AreaJ Medical Aid NULL
1/20/2017 AreaJ Medical Aid NULL
7/11/2019 AreaJ Medical Aid NULL
11/8/2020 AreaJ Medical Aid NULL
7/18/2018 AreaJ Medical Aid NULL
10/31/2018 AreaJ Medical Aid NULL
2/12/2020 AreaJ Medical Aid NULL
5/29/2017 AreaJ Medical Aid NULL
6/8/2021 AreaJ Lost Time NULL
7/4/2018 AreaJ Lost Time NULL
11/20/2019 AreaJ Lost Time NULL
1/29/2019 AreaJ Medical Aid NULL
6/15/2022 AreaJ Medical Aid NULL
1/2/2019 AreaJ Medical Aid NULL
2/7/2019 AreaJ Medical Aid NULL
3/24/2019 AreaJ Medical Aid NULL
5/26/2022 AreaJ Medical Aid NULL
11/6/2016 AreaJ Medical Aid NULL
6/4/2017 AreaJ Medical Aid NULL
3/24/2020 AreaJ Lost Time NULL
9/16/2022 AreaJ Lost Time NULL
5/14/2018 AreaJ Lost Time NULL
7/27/2022 AreaJ Medical Aid NULL
8/5/2017 AreaJ Medical Aid NULL
6/11/2022 AreaJ Medical Aid NULL
10/20/2022 AreaJ Medical Aid NULL
12/22/2019 AreaJ Medical Aid NULL
12/1/2022 AreaJ Medical Aid NULL
10/26/2018 AreaJ Lost Time NULL
2/12/2022 AreaJ Medical Aid NULL
5/21/2022 AreaJ Medical Aid NULL
7/26/2016 AreaJ Medical Aid NULL
5/22/2017 AreaJ Medical Aid NULL
7/11/2016 AreaJ Medical Aid NULL
3/8/2019 AreaJ Medical Aid NULL
9/18/2019 AreaJ Medical Aid NULL
4/1/2017 AreaJ Medical Aid NULL
5/20/2022 AreaJ Medical Aid NULL
5/12/2020 AreaJ Medical Aid NULL
2/22/2016 AreaJ Medical Aid NULL
1/4/2018 AreaJ Medical Aid NULL
9/18/2020 AreaJ Medical Aid NULL
9/17/2018 AreaJ NULL PSET1
5/15/2018 AreaJ Medical Aid NULL
7/24/2020 AreaJ NULL PSET2
3/23/2020 AreaJ Medical Aid NULL
4/13/2016 AreaJ Medical Aid NULL
1/31/2016 AreaJ Medical Aid NULL
5/10/2018 AreaJ Medical Aid NULL
5/21/2017 AreaJ Medical Aid NULL
1/8/2021 AreaJ Medical Aid NULL
8/4/2017 AreaJ NULL PSET2
8/11/2022 AreaJ Medical Aid NULL
3/31/2021 AreaJ Medical Aid NULL
12/11/2020 AreaJ Medical Aid NULL
3/3/2017 AreaJ Medical Aid NULL
1/22/2022 AreaJ Medical Aid NULL
10/8/2021 AreaJ Medical Aid NULL
5/30/2017 AreaJ Medical Aid NULL
3/14/2019 AreaJ Medical Aid NULL
10/12/2020 AreaJ Medical Aid NULL
7/23/2017 AreaJ Medical Aid NULL
3/15/2021 AreaJ Medical Aid NULL
6/24/2020 AreaB NULL PSET2
10/2/2016 AreaB NULL PSET2
1/2/2017 AreaB Modified Duty NULL
8/5/2021 AreaB Medical Aid NULL
11/17/2021 AreaB Medical Aid NULL
7/12/2018 AreaA NULL NULL
12/22/2016 AreaA NULL NULL
8/13/2021 AreaA NULL NULL
8/28/2021 AreaA NULL NULL
4/10/2020 AreaA NULL NULL
1/28/2019 AreaJ NULL PSET2

Didn't realize I could just paste it and it would pick it up as a table.. Sorry about that