Mysql problem, common mysql interview problem