我在尝试这个sql时遇到错误...
SELECT customers.customers_first_name GROUP_CONCAT(customers_groups.customers_hash SEPARATOR '')
FROM customers INNER JOIN customers_groups ON (customers.hash = customers_groups.customers_hash)
GROUP BY customers.customers_entry_date
CUSTOMERS DATABASE
`customers_id`,
`customers_first_name`,
`customers_surname`,
`customers_telephone`,
`customers_email`,
`customers_telephone_active`,
`customers_email_active`,
`client_type`,
`customers_hash`,
`customers_entry_date`
CUSTOMERS_GROUPS
`groups_hash`
`customers_hash
答案 0 :(得分:1)
理想情况下,您应该发布带有问题的错误消息,但请检查以下解决方案。
SELECT customers.customers_first_name, GROUP_CONCAT(customers_groups.customers_hash SEPARATOR '')
FROM customers INNER JOIN customers_groups ON (customers.hash = customers_groups.customers_hash)
GROUP BY customers.customers_entry_date
SELECT customers.customers_first_name ,
在GROUP_CONCAT 之前的select语句中缺少“,”