我正在尝试从我的 SQL 语句中删除重复的客户 ID、名字和姓氏我希望能够按客户 ID 分组并从最终输出中删除重复的客户 ID 表单、名字和姓氏
SELECT customers.customerid,
customers.title,
customers.firstname,
customers.lastname,
customers.postion,
company.companyname,
(SELECT label.labelcontacttype
FROM label
WHERE label.labelcontacttypeid =
customer_contacts.labelcontacttypeid)AS
contactType,
customer_contacts.contactdetails,
customer_contacts.status,
customer_contacts.notes
FROM customers
INNER JOIN customer_company
ON customers.customerid = customer_company.customerid
INNER JOIN company
ON customer_company.companyid = company.companyid
INNER JOIN customer_contacts
ON customers.customerid = customer_contacts.customerid
电流输出
15 Mr Mike Smith Web Developer compudata Email email@email.com 1 dvv
15 Mr Mike Smith Web Developer compudata Phone 111-111-1111 1 ex:2222