title: how to add a subquery in select method on laravel 5
body: <p>The code sample as following:</p>
  
  <pre><code>DB::table('orders')-&gt;select([
      DB::raw('SELECT COUNT(id) AS order_count WHERE type = 2'),
      DB::raw('SELECT SUM(id) AS order_sum WHERE type = 2')
  ])-&gt;paginate(20);
  </code></pre>
  
  <p>The selected fields are statistic fields,the subquery contain several conditions.I type the code like that,but the code can't work and make a syntax error,then i can't find out where the wrong is.who can help me? thanks!</p>