AC5FF
Registered User.
- Local time
- Today, 04:36
- Joined
- Apr 6, 2004
- Messages
- 552
I have run a query that will return repair data out of my database and it works without any difficulties. What my query returns is:
Abbr , S/N , TIN Date , REC Date
(FYI S/N = Serial#)
Because I am only looking for one specific abbr, all of this column is the same. The S/N column will be different for each line, or multiple copies depending on the TIN_Date field. (I.E. we repaired S/N XXX five times over the date range of the query).
What I need to show is the average time between fails. So, if S/N "1" was recieved once, there would be a zero or blank returned. But if S/N "3" was repaired four times I would like to know the average time between the individual TIN Dates.
For the life of me I cannot seem to get anything to work right. It is probably something VERY simple that I just am not seeing.
Here is a copy of the base query I am working out of.
Abbr , S/N , TIN Date , REC Date
(FYI S/N = Serial#)
Because I am only looking for one specific abbr, all of this column is the same. The S/N column will be different for each line, or multiple copies depending on the TIN_Date field. (I.E. we repaired S/N XXX five times over the date range of the query).
What I need to show is the average time between fails. So, if S/N "1" was recieved once, there would be a zero or blank returned. But if S/N "3" was repaired four times I would like to know the average time between the individual TIN Dates.
For the life of me I cannot seem to get anything to work right. It is probably something VERY simple that I just am not seeing.
Here is a copy of the base query I am working out of.
Code:
SELECT lru.abbr, Work.[s/n], Work.[Rec Date], Work.[TIN Date]
FROM lru INNER JOIN [Work] ON lru.ID = Work.[LRU ID]
WHERE (((lru.abbr)="Engine SCDU") AND ((Work.[TIN Date])>#1/1/2007#))
GROUP BY lru.abbr, Work.[s/n], Work.[Rec Date], Work.[TIN Date]
ORDER BY Work.[s/n], Work.[TIN Date];