title: How to divide each row of column by its max min value SQL?
body: <p>I've table "datakota" which have 9 fields then I made a query to select max, min value all of field. But the result has shown "1" value all of row. Please help me if I'm wrong. </p>
  
  <pre><code>|id| |kota_kab| |ipm| |pddmiskin| |ginirasio| |rasio_k| |indks_pend| |indks_kes| |ppk| |tpt| |tpak|
  
  SELECT ipm/MAX(ipm) AS maxipm,
         pddmiskin/MIN(pddmiskin) AS minpddmiskin, 
         ginirasio/MIN(ginirasio) AS minginirasio, 
         rasio_k/MIN(rasio_k) AS minrasio_k, 
         indks_pend/MIN(indks_pend) AS minpend, 
         indks_kes/MAX(indks_kes) AS maxkes,
         ppk/MAX(ppk) AS maxppk,
         tpt/MIN(tpt) AS mintpt, 
         tpak/MAX(tpak) AS maxtpak 
  FROM datakota
  </code></pre>