mySQL select one column DISTINCT, with corresponding other columns -


id   firstname   lastname 1      john        doe 2      bugs        bunny 3      john        johnson 

i want select distinct results firstname column, need corresponding id , lastname.

the result set needs show 1 john, id of 1 , lastname of doe.

try query

 select id, firstname, lastname table group by(firstname) 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -