title: Mysql Join with WHERE min(value)
body: <p>I have this problem</p>
  
  <p>I have 2 Tables</p>
  
  <pre><code>1. product_detail
  -id
  -name
  -thumb
  
  2. product_sale
  -id
  -pid
  -fid
  -price
  -package
  </code></pre>
  
  <p>.</p>
  
  <pre><code> SELECT * 
   FROM product_sale 
   WHERE MIN(product_sale.price) 
   JOIN product_detail 
     ON product_detail.id = product_sale.pid
  </code></pre>
  
  <p>ORIGINAL SELECT SORRY POSTED WRONG</p>
  
  <pre><code>SELECT * FROM product_detail INNER JOIN product_sale ON product_detail.id = pid
  </code></pre>
  
  <p>I Have 1 Product in product_detail Example Product1
  I Have Many rows in product_sale for Product1 but different product_sale.fid and product_sale.price</p>
  
  <p>What i need to do ist make a select that display Product1 With Lovest Price in product_sale</p>
  
  <pre><code>1 Product1 1.50 1pz
  2 Product2 2.50 3pz
  3 Product3 3.00 1pz
  </code></pre>
  
  <p>Now i Get</p>
  
  <pre><code>1 Product1 1.50 1pz
  2 Product1 1.65 1pz
  3 Product1 1.70 1pz
  4 Product3 3.00 1pz
  </code></pre>
  
  <p>Please helpme what select i need to do ??Thank You All</p>