title: How to perform Sql pivot without aggregation and with order by?
body: <p>I have Persons table As shown in image and i want to convert it into Table2 </p>
  
  <p><a href="https://i.stack.imgur.com/jjE3h.png" rel="nofollow noreferrer">Table Image</a></p>
  
  <p>This is how I am Trying to build query in Sql Server but i don't know what to write in place of aggregate function and one more thing is that I want all person name  in alphabetical order in respective country as shown in image.</p>
  
  <pre><code>Select Usa ,India, Uk from Persons
  
  pivot
  (
  Aggregate(i_dont_know) for Country in ([Usa],[India],[Uk])
  )
  </code></pre>