In Go, I write a query that gives me all data but I just want to data where products.id and clients.id are distinct.What is the simile query I can write?
res := find.Model(&domain.Clients{}). Select ("products.id product_id, products.name product_name,"+" clients.id id, clients.name name, clients.logo, clients.address, "+"clients.business_id, clients.num_of_employee, clients.email, clients.sns_link, clients.phone"). Joins("LEFT JOIN company_interests ON company_interests.client_id = clients.id"). Joins("LEFT JOIN products ON products.id = company_interests.product_id"). Where("products.id = ? ", productId).Find(&resp)