title: How do I get the count of distinct values in the first row of the result
body: <p>I want to check if the colour and city are multiple for a document for the highest amount. if yes, I want to set a bit as 1 and if not, it should be 0</p>
  <p>Sample data:</p>
  <pre><code>Code doc year amount colour city
  AB   123 2021 485    Red    Paris
  AB   123 2021 416    Red    Paris
  AB   123 2021 729    Red    London
  AB   123 2021 645    Red    Bengaluru
  </code></pre>
  <p>Expected output:
  I want the output in one row</p>
  <pre><code>Code Doc Year Amount Colour City  Col_Mul City_Mul 
  AB   123 2021 729    Red    London 0       1
  </code></pre>
  <p>Amount, Colour and city should be the maximum one.</p>
  <p>What I tried:
  To get the data in one row, I used the row number and ordered by the maximum amount and selected the data where the row number is one. But after that I used dense rank for the Colour and City column. But I didn't get the expected output.</p>