Re: [SQL] Aggregate over a linked list

2013-01-17 Thread Venky Kandaswamy
[email protected] [[email protected]] on behalf of M Lubratt [[email protected]] Sent: Thursday, January 17, 2013 3:19 PM To: [email protected] Subject: [SQL] Aggregate over a linked list Hello! I trade futures contracts and I have a PostgreSQL 9.2 database that keeps track

[SQL] Aggregate over a linked list

2013-01-17 Thread M Lubratt
Hello! I trade futures contracts and I have a PostgreSQL 9.2 database that keeps track of all of my trading activity. The table includes columns for the futures contract, the entry and exit dates and the profit for that particular trade. Now, futures contracts expire, so within a trade being ind