需要帮助来修复错误,尝试运行查询并收到错误每个派生表都必须有自己的别名,下面是代码:
$sql="SELECT trouble_type_priority, category_1, category_2, status, COUNT(*) FROM
( SELECT DISTINCT trouble_type_priority, category_1, category_2 FROM tbl_main )
GROUP BY trouble_type_priority,category_1,category_2 HAVING COUNT(*) > 1";