Work on MySql code for JRP