I'm creating a 404 application that will monitor and record any 404 that is thrown to the user. I have a DB with 5 columns in it (ID, DATE, IP, REFERER, and ATTEMPTEDPAGE). In the admin toolkit (where the admin will go to view the 404's in order to fix them), I'd like to display a table of only unique errors. For example... if the same referring page (call it page A) causes a page (say, page B) to 404 a thousand times, I'd only want it to show up once. However.... if there are 10 pages that link to page b, i'd like to show all of them. I tried playing around with distinct, but couldn't get it just right. Anybody able to help me out here? Example of Database Code: ID DATE IP REFERER ATTEMPTEDPAGE 1 1/1/2001 220.127.116.11 Page1.cfm Page2.cfm 2 1/1/2001 18.104.22.168 Page1.cfm Page2.cfm 3 1/1/2001 22.214.171.124 Page1.cfm Page2.cfm 4 1/1/2001 126.96.36.199 Page1.cfm Page2.cfm 5 1/1/2001 188.8.131.52 Page3.cfm Page2.cfm 6 1/1/2001 184.108.40.206 Page4.cfm Page2.cfm 7 1/1/2001 220.127.116.11 Page3.cfm Page2.cfm So in the example above, all i would want on the query return would be ID#'s 1, 5, and 6 since everything else is just a duplicate of one of those 3.