This could be done with simple SQL query over qcsiteadmin_db database on your DB server.
**Note:** Please ask your Database Administrator(DBA) for assistance on this.
In the following example is used a 3-months period.
**For MS SQL:**
WITH Not_Used_Projects AS
(SELECT sh.DOMAIN_NAME, sh.PROJECT_NAME, MAX(END_TIME) AS LAST_USAGE
FROM td.SESSIONS_HISTORY AS sh
WHERE END_TIME IS NOT NULL
GROUP BY sh.PROJECT_NAME, sh.DOMAIN_NAME)
SELECT nup.*
FROM Not_Useed_Projects AS nup
INNER JOIN td.PROJECTS p on p.PROJECT_NAME = nup.PROJECT_NAME AND PR_IS_ACTIVE = 'Y'
WHERE LAST_USAGE <= DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()) -3, 0)
**For Oracle:**
WITH Not_Used_Projects AS
(SELECT sh.DOMAIN_NAME, sh.PROJECT_NAME, MAX(END_TIME) AS LAST_USAGE
FROM tm_alm12_qcsiteadmin_db.SESSIONS_HISTORY sh
WHERE END_TIME IS NOT NULL
GROUP BY sh.PROJECT_NAME, sh.DOMAIN_NAME)
SELECT nup.*
FROM Not_Used_Projects nup
INNER JOIN PROJECTS p on p.PROJECT_NAME = nup.PROJECT_NAME AND PR_IS_ACTIVE = 'Y'
WHERE LAST_USAGE <= ADD_MONTHS(sysdate, -3);