title: Oracle - How to calculate profit that is above average
body: <p>I have a table that contains items, buyprice, and sellprice.  I need to figure out how to return which items were sold for a profit above average.  I realize that for each item that I need to calculate sellprice-buyprice to get the profit.  I then need to take the profit from each item and calculate the average profit of all of the items.  I then need to return the items that have profits that are above that average.  I have tried various subselects and I just can't seem to figure out how to return what I want.</p>