Investigated and fixed issues with SRDA data collection, caused by incorrect formatting and placement of WHERE clause in SQL queries. The fix includes handling special cases, such as SQL queries, containing aggregate functions (GROUP BY, etc.). Tested with Project ID range specification enabled.