help to construct a query

liangtp

New member
Local time
Tomorrow, 03:12
Joined
Mar 26, 2009
Messages
1
tableA
TicketNo, Remark, Service, ServingTime, TotalTime
5001, N, 5, 12:00:22, 12:00:38
5001, F, 11, 12:02:02, 12:02:21
5002, N, 5, 12:00:44, 12:01:12
5002, F, 11, 12:01:33, 12:01:54

Guys. I have tableA with 4 records.
I wish to write a query that adds the ServingTime of the record with Remark = N to the TotalTime field of the record with Remark = F. Both must be of the same TicketNo. My output would be:

TicketNo, SumOfTime
5001, 12:02:43
5002, 12:02:38

Could you please help me to construct the query? Thanks.
 
Download the attached file and check query "yourquery"

Hope it fulfills your requirement
 

Attachments

Users who are viewing this thread

Back
Top Bottom