Check out example codes for "mysql select into new table". It will help you in understanding the concepts better.
Code Example 1
Press CTRL+C to copy CREATE TABLE new_tbl [AS] SELECT * FROM orig_tbl;
Code Example 2
CREATE TABLE artists_and_works SELECT artist.name, COUNT(work.artist_id) AS number_of_works FROM artist LEFT JOIN work ON artist.id = work.artist_id GROUP BY artist.id;
Learn ReactJs, React Native from akashmittal.com