Find the project id you'd like to keep and run these delete statements, which will delete everything not associated with a given project. Note that wikis and discussion groups should be unaffected.
DELETE FROM Attachment
WHERE ixBugEvent > 0 AND ixBugEvent NOT IN
(SELECT BugEvent.ixBugEvent FROM BugEvent
LEFT JOIN Bug ON Bug.ixBug = BugEvent.ixBug
WHERE Bug.ixProject = 123);
DELETE FROM BugEvent
WHERE ixBug NOT IN (SELECT ixBug FROM Bug WHERE ixProject=123);
DELETE FROM BugView
WHERE ixBug NOT IN (SELECT ixBug FROM Bug WHERE ixProject=123);
DELETE FROM BugRelation
WHERE ixBugFrom NOT IN (SELECT ixBug FROM Bug WHERE ixProject=123);
DELETE FROM BugRelation
WHERE ixBugTo NOT IN (SELECT ixBug FROM Bug WHERE ixProject=123);
DELETE FROM Duplicates
WHERE ixBugDupe NOT IN (SELECT ixBug FROM Bug WHERE ixProject=123);
DELETE FROM Duplicates
WHERE ixBugDupeOf NOT IN (SELECT ixBug FROM Bug WHERE ixProject=123);
DELETE FROM Scout WHERE ixBug NOT IN (SELECT ixBug FROM Bug WHERE ixProject=123);
DELETE FROM TagAssociation
WHERE ixBug > 0 AND ixBug NOT IN (SELECT ixBug FROM Bug WHERE ixProject=123);
DELETE FROM Bug WHERE ixProject <> 123;
You probably also want to run:
DELETE FROM Mailbox;
DELETE FROM MailQueue;
This will prevent the duplicate database from checking the mailboxes of the original.