1CREATE TABLE new_tbl LIKE orig_tbl; //(creates an empty table only definition is
2 same.)
1CREATE TABLE artists_and_works
2 SELECT artist.name, COUNT(work.artist_id) AS number_of_works
3 FROM artist LEFT JOIN work ON artist.id = work.artist_id
4 GROUP BY artist.id;