title: Sort price with currency symbol in MySQL
body: <p>I have a price field in table which has price as</p>
  
  <pre><code>$5000
  $500
  $6000
  $4000
  </code></pre>
  
  <p>I want to sort them in ascending order.</p>
  
  <p>I tried</p>
  
  <pre><code>ORDER BY SUBSTRING_INDEX('price', '$', 1),
  CAST(SUBSTRING_INDEX(`price`, '$', -1) AS SIGNED)
  </code></pre>
  
  <p>but its not working.</p>