in MySQL what is the query to show these student's that each marks less than 50?
SELECT Name, 
       MAX(CASE WHEN Subject = 'Word' then Marks END) Word,
       MAX(CASE WHEN Subject = 'Excel' then Marks END) Excel,
       MAX(CASE WHEN Subject = 'Access' then Marks END) Access
FROM Datatable
GROUP BY Name
    -- If ALL marks must be below 50
-- HAVING GREATEST(Word, Excel, Access) &lt; 50;
    -- If at least one mark must be below 50
HAVING LEAST(Word, Excel, Access) &lt; 50;