G
Guest
I have a table that has the following fields:
Date
Name
Weight
Unit (i.e. g, kg, lbs etc)
I would like a query that returns the percentage change of the weight. For
instance:
10/10/06 167 g
10/17/06 175 g
% change=+4.7%
Or:
10/1/06 135 g
10/3/06 130g
% change= -3.7%
The dates are not necessarily consecutive (weights are not entered daily).
The percentage calculation should be done between matching unit types (I
think the Group By field takes care of that).
Lots of different names (again, I think the Group By field takes care of that)
I know it probably has to do with a subquery, but I can't figure out how to
define the next to last date. Max Date I've got. How do I define the date
right before the Max Date?
Thanks for any help you can give!
Date
Name
Weight
Unit (i.e. g, kg, lbs etc)
I would like a query that returns the percentage change of the weight. For
instance:
10/10/06 167 g
10/17/06 175 g
% change=+4.7%
Or:
10/1/06 135 g
10/3/06 130g
% change= -3.7%
The dates are not necessarily consecutive (weights are not entered daily).
The percentage calculation should be done between matching unit types (I
think the Group By field takes care of that).
Lots of different names (again, I think the Group By field takes care of that)
I know it probably has to do with a subquery, but I can't figure out how to
define the next to last date. Max Date I've got. How do I define the date
right before the Max Date?
Thanks for any help you can give!