SELECT city,zip,AVG(PAY_RATE),AVG(SALARY)
FROM employee_tbl E
INNER JOIN EMPLOYEE_PAY_TBL P
ON E.EMP_ID = P.EMP_ID
GROUP BY ROLLUP(CITY,ZIP);
错误代码如下:
错误代码: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(CITY,ZIP) LIMIT 0, 1000' at line 5
FROM employee_tbl E
INNER JOIN EMPLOYEE_PAY_TBL P
ON E.EMP_ID = P.EMP_ID
GROUP BY ROLLUP(CITY,ZIP);
错误代码如下:
错误代码: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(CITY,ZIP) LIMIT 0, 1000' at line 5
FROM employee_tbl E
INNER JOIN EMPLOYEE_PAY_TBL P
ON E.EMP_ID = P.EMP_ID
GROUP BY city,zip with ROLLUP;