For generating a report on Tables last updated,created and the no of bytes increase/decrease as growth.Report will run on demand and has below format.

Tablename Bytes_Prev Run Bytes_nextrun Growth=column2-column1 creation date updated

And my table holds values as below:

Tablename Bytes Creation Date Update_date
a 20 2011-jun-02 2011-jun-03
b 30 2011-Jun-11 2011-jun-13
a 30 2011-jun-02 2011-Jun-20

Looking to display the data as
Tbl Bytes_prevrun Bytes_Nextrun growth creationdate updatedate
a 20 30 30-20=10 2011-Jun-02 2011-Jun-20
b 30 0 30 2011-Jun-11 2011-Jun-13

After displaying the data, have to delete a record for 'a' having 20 bytes and update_date as 2011-Jun-03,since in the next run we have latest record in the table for comparing with the input records generated on the next run.

Need help to produce this output.