Hi all,
I have the following table:
Date Time Machine counter
29/11/04 23:00 40 10
29/11/04 23:05 41 20
29/11/04 23:30 43 60 30/11/04 06:30 40 200
30/11/04 07:00 41 300
30/11/04 09:00 40 700
30/11/04 12:00 41 1000

We see that we have data about counter in different machines and in different time period.
My target to build a query to calculate how did machine made in the givven periods. For examlpe of machine 40,
From 29/11/04 23:00 ~ 30/11/04 06:30 (200-10)=190
From 30/11/04 06:30 ~ 30/11/04 09:00 (700-200)=500
Also for machine 41,43,...

Can you help me please building the query...
best regards...