![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, Please look at the following example, where we measure the size of some kids: SELECT name, measurement_date, size FROM kids WHERE name = 'Bill' ORDER BY 1,2; Bill | 2007-01-01 | 90 Bill | 2007-05-01 | 95 Bill | 2007-12-01 | 101 How can I rewrite the query that it gives me the growth since the last measurement? Like this: Bill | 2007-01-01 | 90 | (null) Bill | 2007-05-01 | 95 | 5 Bill | 2007-12-01 | 101 | 6 There are surely many ways to do this, but what is the best / easiest approach? Thanks and best, Hans |
#3
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |