title: Select multiple columns but group by should be on only one column
body: <pre><code>SELECT * FROM(SELECT DISTINCT DRUG_NAME, SUM(WEIGHT) FROM FIR
  
                INNER JOIN USER_LOGIN ON FIR.USER_ID = USER_LOGIN.USER_ID
                INNER JOIN POLICE_STATION ON FIR.PS_ID = POLICE_STATION.PS_ID
                INNER JOIN DRUG_INFO ON FIR.FIR_NO = DRUG_INFO.FIR_NO
  
                WHERE WEIGHT != 0 AND DRUG_FORM = 'Litres (l)'
                GROUP BY DRUG_NAME
                )
  </code></pre>
  
  <p>I want a group by on <code>drug_name</code> but want these columns in the select <code>drug_form,weight,picture,username</code>. The above sql statement is working fine but i can't select <code>drug_form,weight,picture,username</code> columns.</p>
  
  <p><strong>i want to combine drug name like opium together and show there total count on 1 column.</strong></p>
  
  <p><img src="https://i.stack.imgur.com/8ZZUp.png" alt="&lt;code&gt;pic&lt;/code&gt;"></p>
  
  <p><img src="https://i.stack.imgur.com/QRua7.png" alt="&lt;code&gt;pic3&lt;/code&gt;"></p>