第一题 select Case When t.flag>0 Then "T" Else "F" End from (SELECT instr(TableA.col1,TableA.col2) as flag from TableA) t第三题 select s.* from student s ,(SELECT name,MAX(score) m from student GROUP BY name) t where s.name = t.name and s.score = t.m ORDER BY `name`第四题 select name, GROUP_CONCAT( CONCAT('{"',subject,'":',score,"}") ) from student GROUP BY name