Yes, so sorry. That was my fault. I had issues trying to get my post to take, so I did not catch that when I re-pasted the post. The last ) does not exist in the actual Jasper query. In SQL, it works (I just subsitute the $P parameter dates with actual query language), but once I added in the row_number in Jaspersoft, it stopped working the red X error reads Multiple markers at this line- missing EOF at '('- missing ')' at 'OVER'- no viable alternative at input ')'Again, my apologies, but I appreciate any insight. I am hoping version 5.6.1 can support this query? If it helps, this is the SQL command that works great : select a.oracle_project_id, a.client_id, a.mhs_client, a.stage, a.Date_Changedfrom (select o.oracle_project_id, o.client_id, o.mhs_client, v.Date_Changed, stg.name stage,ROW_NUMBER() OVER (PARTITION BY o.oracle_project_id ORDER BY v.Date_Changed desc) AS RowNumberfrom inv_investments invinner join inv_projects p on inv.id = p.prid and p.is_template = 0 and p.IS_PROGRAM = 0inner join odf_ca_project o on o.id = inv.idinner join allscripts_oracle_project_audit_view v on v.Project_Code = inv.code and v.COLUMN_NAME = 'is_active' and v.System_Value_After = 0 and v.date_changed BETWEEN '2016-01-01' and '2016-01-13'LEFT OUTER JOIN CMN_LOOKUPS_V stg ON inv.stage_code =stg.lookup_code AND stg.lookup_type = 'INV_STAGE_TYPE' and stg.language_code ='en' and stg.is_active = '1' and stg.parent_lookup_code = 'mhs_stage'inner join prj_obs_associations o2 on inv.ID = o2.RECORD_ID and o2.table_name = 'SRM_PROJECTS'and o2.unit_id in ( (select n.child_obs_unit_id from PRJ_OBS_UNITS o, NBI_DIM_OBS_FLAT nwhere o.name in ('Allscripts Services')and o.depth = 2and n.parent_obs_unit_id = o.id)) inner join (select o4.oracle_project_id from odf_ca_project o4 join srm_projects p2 on o4.id=p2.id where p2.is_program = 0group by o4.oracle_project_id having sum (p2.is_active)= '0') o3 on o3.oracle_project_id =o.oracle_project_idwhere o.oracle_project_id is not null) awhere a.RowNumber = 1