title: Select MIN value on INNER JOIN
body: <p>I have some problem when selecting Minimum value. i have create inner join with 2 table and simple calculation in SQL query. Now i want to select minimum value from the calculation. here my query..</p>
  
  <pre><code> $sql = "SELECT jobmatl_mst.item as item2,jobmatl_mst.u_m, job_mst.item, jobmatl_mst.job, jobmatl_mst.item as item2, jobmatl_mst.description, jobmatl_mst.matl_qty_conv , itemwhse_mst.item  as whseitem,itemwhse_mst.qty_on_hand, itemwhse_mst.qty_on_hand / jobmatl_mst.matl_qty_conv as total 
  FROM job_mst 
  INNER JOIN jobmatl_mst ON job_mst.job=jobmatl_mst.job 
  INNER JOIN itemwhse_mst ON jobmatl_mst.item=itemwhse_mst.item 
  WHERE job_mst.item ='601010944003' AND job_mst.type='S'
  ORDER BY total";
  </code></pre>
  
  <p>i want to find minimum value for "total"..</p>