I would like to add a running sum column to each VT count by Welder/Insp and add another column to assign a number in another column to the item numbers in increments of 20. How do I add this to my SQL to achieve this? I am attaching a copy of the datasheet so you have a better understanding of what I am trying to arrive at.
TRANSFORM Count([Weld Log].Activity) AS CountOfActivity
SELECT [Weld Log].[Welder/Insp], [Weld Log].[Spool #], [Weld Log].[Weld #], [Weld Log].WPS, [Weld Log].Type, [Weld Log].Date, [Weld Log].[Pass or Fail], [Weld Log].Comment, Count([Weld Log].Activity) AS [Total Of Activity]
FROM [Weld Log]
WHERE ((([Weld Log].Type)="BUTTWELD") AND ((([Weld Log].[Pass or Fail])="PASS" Or ([Weld Log].[Pass or Fail])="Fail") And (([Weld Log].[Pass or Fail])="Pass" Or ([Weld Log].[Pass or Fail])="Fail")) AND (([Weld Log].NDE)=("VT")))
GROUP BY [Weld Log].[Welder/Insp], [Weld Log].[Spool #], [Weld Log].[Weld #], [Weld Log].WPS, [Weld Log].NDE, [Weld Log].Type, [Weld Log].Date, [Weld Log].[Pass or Fail], [Weld Log].Comment, [Weld Log].NDE
PIVOT [Weld Log].NDE;