Oracle Sql Loop Through Select Statement Mysql Data