title: Select count of grouped Products AND the cheapest price for each product
body: <p>I'm trying to select the distinct products, grouped by all columns except the ID, and the cheapest bid for that type of product. Sometimes, there may be no bids for that product, so I'll need to left join to account for those.</p>
  <p>I'll add the desired output below and also a sort-of pseudo query to help explain.</p>
  <p>If it helps, you can imagine a product search page. When the user searches, it groups all the same products together. These products can be sold by many different sellers but we want to only show it once within the results, along with the cheapest price for that product at the time of the search.</p>
  <p><strong>Data I want returned</strong></p>
  <pre><code>SELECT count(Name), Size, Weight, Color, BidID, Status, min(Price)
  -- joins go here --
  -- group by Size, Weight, Color, BidID, Status
  </code></pre>
  <p>Will also require WHERE clauses, which are built based on filters used by end user. Examples:</p>
  <pre><code>WHERE Status = 'Active' and Weight = '1kg'
  WHERE Status = 'Active'
  WHERE Size = '1m' and Weight in ('1kg', '2kg')
  </code></pre>
  <p><strong>Products Table</strong></p>
  <pre><code>| ProductID (PK) | Name        | Size | Weight | Color  |
  | --------       | --------    | -----| -----  | -----  | 
  | 1              | Black Table | 1m   | 2kg    | Black  | 
  | 2              | Purple Table| 1m   | 3kg    | Purple | 
  | 3              | Small Table | 1m   | 3kg    | Black  | 
  | 4              | Small Table | 1m   | 3kg    | Black  | 
  | 5              | Black Table | 1m   | 2kg    | Black  | 
  | 6              | Purple Table| 1m   | 3kg    | Purple |
  | 7              | Small Table | 1m   | 3kg    | Black  | 
  | 8              | Small Table | 1m   | 3kg    | Black  | 
  </code></pre>
  <p><strong>Bids Table</strong></p>
  <pre><code>| BidID (PK)     | ProductID   | Status      | Price   |
  | --------       | -------     | --------    | -----   |
  | 1              |  1          | Active      | 123.5   |
  | 2              |  1          | Active      | 325.99  |
  | 3              |  1          | Active      | 85.99   |
  | 4              |  3          | Cancelled   | 315.99  |
  | 5              |  4          | Active      | 113.5   |
  | 6              |  3          | Cancelled   | 305.99  |
  | 7              |  1          | Active      | 82.99   |
  | 8              |  2          | Active      | 345.99  |
  </code></pre>
  <p><strong>DESIRED OUTPUT EXAMPLE</strong></p>
  <pre><code>| Count          | Name        | Size | Weight | Color  | BidID |CheapestPrice |
  | --------       | --------    | -----| -----  | -----  | ----- | -----     |
  | 38             | Black Table | 1m   | 2kg    | Black  |  1    | 123.5
  | 21             | Purple Table| 1m   | 3kg    | Purple |  2    | 89.95
  | 13             | Small Table | 1m   | 3kg    | Black  |  3    | 65.94
  </code></pre>