Simplify a SQL table result with less rows I have a table where there are some names with 3 sports. If the person practices the sport it shows a '1' else '0'.



How can I change the table with SQL so that it only shows a line per person, like this:



Regrads,
Elio Fernandes
This is referred to as an aggregate query.  See the MySQL dev page for details about the various aggregates you can use.  

This query will return a sum total for each sport, for each Name.

SELECT Name
    , SUM(Football) AS Football
    , SUM(Darts) AS Darts
    , SUM(Diving) AS Diving
FROM mytable
GROUP BY Name;


See this SQL Fiddle for a working example.