ReportGenerator2- advanced SQL