To get only the name and the date you need to use the SELECT statement (http://www.w3schools.com/sql/sql_select.asp)
INNER JOIN doesn't remove duplicates. To do that you need to use the DISTINCT statement
(http://www.w3schools.com/sql/sql_distinct.asp)
Example of your problem (NOTE: Tables are fake and might not make sense, they're just for the example)
TABLE1 TABLE2
|id | date | |id | name | age |
| 1 | 2010 | | 1 | mike | 5 |
| 2 | 2010 | | 2 | mike | 6 |
Since you have 2 people called mike that have the same date, if you join the tables you will get:
enter code here
SELECT t1.id, t1.date, t2.name, t2.age
FROM TABLE1 as t1
INNER JOIN TABLE2 as t2 ON t1.id = t2.id
TABLE JOINED
|id | date | name | age |
| 1 | 2010 | mike | 5 |
| 2 | 2010 | mike | 6 |
If you only select the date and the name, you'll get the same lines, but without the age and the id.
SELECT t1.id, t1.date, t2.name, t2.age
FROM TABLE1 as t1
INNER JOIN TABLE2 as t2 ON t1.id = t2.id
TABLE JOINED / FILTERED
| date | name |
| 2010 | mike |
| 2010 | mike |
You can see the repeated rows.
The distinct statement is for that.
The w3schools tutorial can be a little hard to follow (it's not organized in clear steps). I would recommend googling for a different one.
=========
EDIT: You changed the question.
For that you need to use GROP BY
and MAX
(http://www.w3schools.com/sql/sql_groupby.asp)
(http://www.w3schools.com/sql/sql_func_max.asp)