title: Distinct values in multiple columns
body: <p>I am trying to get distinct values for multiple columns in table.</p>
  
  <p>for example if my table has COL1,COL2,COL3 as columns and I am running a query like</p>
  
  <pre><code>SELECT DISTINCT COL1, COL2, COL3 FROM TABLEx
  </code></pre>
  
  <p>but what happens is depending on the data in one of the columns I am getting duplicate values in two other columns. If COL1 has 40 unique values and COL2 has only 10 unique values and COL3 has 5 unique values. I am getting 40 rows of data where COL1 is unique and COL2/COL3 has duplicate values. How do i get DISTINCT values for each column and replace the duplicate values by null values. I am doing this only to get distinct values for my drop down lists in a web page. I can always perform seperate query for each field but I think it is not very effective. Any help as I how I approach this?</p>