Hi,
your question is very vague. It is possible to create a table based on a select statement so enhancing the SELECT statement to include a join might work.
Code:
mysql> create table t_select as
-> select * from test;
Query OK, 3 rows affected (0.08 sec)
Records: 3 Duplicates: 0 Warnings: 0
mysql> desc t_select;
+--------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+---------------+------+-----+---------+-------+
| name | varchar(20) | YES | | NULL | |
| salary | decimal(12,4) | YES | | NULL | |
+--------+---------------+------+-----+---------+-------+
2 rows in set (0.01 sec)
mysql> desc test;
+--------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+---------------+------+-----+---------+-------+
| name | varchar(20) | YES | | NULL | |
| salary | decimal(12,4) | YES | | NULL | |
+--------+---------------+------+-----+---------+-------+
2 rows in set (0.01 sec)
The table t_select did not exist before the create table statement.