I have this code in Java and i need to insert the result into new table. Is this possible with just editing this query?
ResultSet result = stat.executeQuery("SELECT artist, COUNT(artist) AS countartist FROM table1 GROUP BY artist ORDER BY countartist DESC;");
insert into some_table (col1, col2) select artist ...create table tab_name as select artist ...