如何在内连接上进行连接?

I have this database:

table

id  fname       dphone      count_pic   dup_id  

6055903 Karla       5126xxx798  1       57  
6173767 Aaliyah     4082xxx534  4       39  
5611411 Aaliyah     4082xxx534  15      39  
5611211 Aaliyah     4082xxx534  18      39  
4234798 Abby        3057xxx974  31      16  
6166691 Walter      6178xxx280  1       74  
3375576 Walter      6178xxx280  17      74

and I found out how to do an inner join on it like this:

SELECT *
  FROM table t1
INNER JOIN (SELECT MIN(count_pic) AS minpic,
               MAX(count_pic) AS maxpic,
               dup_id
          FROM table
      GROUP BY dup_id) t2 ON t1.dup_id = t2.dup_id
                         AND (t1.count_pic = minpic
                           OR t1.count_pic = maxpic)

but what if I want to join this table with another one based on id and return some values , like date,from the second table as well:

table2

    id  date

6055903 111111111
6173767 111111111
5611411 111111111

Any ideas on this?

edit:

the inner join is fine the way it is, i need to add the table2 on top of that query

Just add another JOIN at the end:

SELECT *
  FROM table t1
INNER JOIN (SELECT MIN(count_pic) AS minpic,
               MAX(count_pic) AS maxpic,
               dup_id
          FROM table
      GROUP BY dup_id) t2 ON t1.dup_id = t2.dup_id
                         AND (t1.count_pic = minpic
                           OR t1.count_pic = maxpic)

INNER JOIN table2 ON t1.id = table2.id -- add this