MySQL query optimization

MySQL query optimization