I'd like to use INNER JOIN on 2 tables, but when I try either of the below statements, I get 

> 
> Error in query (1248): Every derived table must have its own alias
> 
> 
> 

```
SELECT DISTINCT(t2.col)
FROM tab2 as t2
INNER JOIN (
  SELECT DISTINCT(t1.col)
  FROM tab1 as t1
  WHERE t1.id>678 AND t1.id<5248
) ON t2.col=t1.col
WHERE t2.id>10 AND t2.id<3770

SELECT DISTINCT(col)
FROM tab2 as t2
INNER JOIN (
  SELECT DISTINCT(col)
  FROM tab1 as t1
  WHERE t1.id>678 AND t1.id<5248
) ON t2.col=t1.col
WHERE t2.id>10 AND t2.id<3770

```

What's the problem?