title: How do I create table in SQL Server using group by query
body: <p>I'm using a query to create a new table in SQL Server using a select query. </p>
  
  <p>My query is</p>
  
  <pre><code>create table test as
      select id, sum(marks) as marks 
      from student
      group by id
  </code></pre>
  
  <p>I'm getting error message in SQL Server. In Stackoverflow I found that instead of create table, SQL Server uses insert into. But I'm not getting how to write group by query using insert into. Can you please guide me?</p>