title: efficent truncate method in mysql?
body: <p>i want to sort my table in this manner.
  This is the current state of my table:</p>
  
  <p><img src="https://i.stack.imgur.com/1zLuU.png" alt="enter image description here"></p>
  
  <p>And this would be the outcome:</p>
  
  <p><img src="https://i.stack.imgur.com/bfpVN.png" alt="enter image description here"></p>
  
  <p>So basically in pseudo code it's:</p>
  
  <pre><code>IF SAME STRING IN "tag" COLUMN THEN add both "power" 
  </code></pre>
  
  <p>Can anyone suggest an efficient way to achieve this if any?</p>