Trouble with a query
- by Mark Allison
Hi there,
I'm having trouble with a query in SQL Server 2008 on some forex trading data. I have a trades table and an orders table. A trade needs to comprise of 2 or more orders. DDL schema and sample data below.
What I want to do is write a query that shows the profit/loss in pips for each trade. A pip is 1/1000th of a currency. So the…