SELECTDATE_FORMAT(CURDATE(), '%Y%m'), DATE_FORMAT(t.transactiontime, '%Y%m'),t.*FROM ttransactions twhere DATE_FORMAT(CURDATE(), '%Y%m')= DATE_FORMAT(t.transactiontime, '%Y%m')