title: Mysql(GroupBy) alternative for Postgresql?
body: <p>I am using laravel with mysql..</p>
  
  <p>I have query something like this..</p>
  
  <pre><code>$mix = Ergebnisse::where(function($q) use($result) {               
      foreach ($result as $item) {
           $q-&gt;orWhere(function($q) use($item) {
               $q-&gt;where('temperatur', $item-&gt;temperatur)
                 -&gt;where('zeit', $item-&gt;zeit);
          });
      }
  })-&gt;groupBy('katogorie_id')-&gt;get();
  </code></pre>
  
  <p>on my localhost it is working fine as i am using mysql there.
  but i deployed the project on Heroku with Postgresql.</p>
  
  <p>I got an error..</p>
  
  <pre><code>SQLSTATE[42803]: Grouping error: 7 ERROR: column "ergebnisse.id" must appear in the GROUP BY clause or be used in an aggregate function
  LINE 1: select * from "ergebnisse" where (("temperatur" = $1 and "ze...
  ^ (SQL: select * from "ergebnisse" where (("temperatur" = 85 and "zeit" = 35) or ("temperatur" = 85 and "zeit" = 30)) group by "katogorie_id")
  </code></pre>
  
  <p>after further searching i came to know that <strong>GroupBy</strong> is not compatible with postgre. is there any other way of doing that? thanks</p>