Aggregate Function Confusion
<p>I have a table with a list of products, schema is:</p>

<pre><code>Product, Warehouse, Supplier, Order Quantity
</code></pre>

<p>What I want to do is for each supplier, select the warehouse that has the most order quantity.</p>

<p>Table Data:</p>

<pre><code>Cornflakes, WH1, Kellogs, 10
Cornflakes, WH2, Kellogs, 5
Cornflakes, WH3, Kellogs, 0
Crunchy,    WH1, Cadbury, 20
Crunchy,    WH2, Cadbury, 10
Mars,       WH1, Cadbury. 56
Mars,       WH4, Cadbury, 8
</code></pre>

<p>I think there is enough information here to provide easy answer, if there is not please ask me for clarification in a comment rather than downvote and I will edit question very quickly.</p>

<p>Sample Output:</p>

<pre><code>Kellogs, WH1
Cadbury, WH1
</code></pre>

<p>Warehouse number will be this one because it has the most total quantity to order for every product under that supplier.</p>