I am requesting sql self join ideas from the experts.

PROC_ID UID PROC_TIMESTAMP
-----------------------------------------------------------------------
706 1 2007-02-06 14:41:12.29
706 2 2007-02-06 17:31:02.191
706 3 2007-02-27 11:42:31.961
901 1 2008-02-29 14:29:19.264
902 2 2008-02-29 14:36:58.62
902 2 2008-02-29 14:37:31.388

PROC_ID = 706 dentotes the record with UID = 1,2,3 should be processed
PROC_ID = 901 dentotes the record with UID = 1 was processed successfully
PROC_ID = 902 dentotes the record with UID = 2 was processed with ERROR

I am looking for a query that filters out the SUCCESSFULLY processed record with UID 1 and the records that has been processed with ERROR 'n' number of times.
Here the 'n' = TWO TIMES.

According to this test case the query should output following record with UID = 3
706 3 2007-02-27 11:42:31.961

Please can anyone show me SQL query.