mysql - SQL Remove duplicates -


i'm new sql , current sql query is:-

select     concat(lastname,', ',firstname)as 'name',</li>     city,     country,     shipcity 'shipped city'      itstudies.employees inner join     orders on employees.employeeid = orders.employeeid city = shipcity; 
query shows output as:-

(only part of output shown.)

name            city     country     shipped city smith, jo       york       uk            york avery, paul     dallas     usa           dallas avery, paul     dallas     usa           dallas  kris, jan       york       uk            york kris, jan       york       uk            york hill, ros       boston     usa           boston 
need take out duplicates , change query show:-

name            city     country     shipped city smith, jo       york       uk            york avery, paul     dallas     usa           dallas kris, jan       york       uk            york hill, ros       boston     usa           boston 
in advance.

you use

select distinct ... 

but better have @ duplicates come , work

group 

in case join orders , duplicates orders of employee. join necessary? use

where exists (select 1 orders orders.employeeid=employees.employeeid) 

to employees ordered.