Hello ssc37. I agree with
Kenosis.
It sounds to me like you should be able to run a query or multiple queries against your table to pull out the results that you want. Some table joins may be in order to accomplish this.
Maybe these references will help.
http://www.w3resource.com/sql/joins/join-a-table-to-itself.php
http://www.codinghorror.com/blog/2007/10/a-visual-explanation-of-sql-joins.html