我真的陷入了这个交叉表问题。我已经阅读了很多解决方案,这个解决方案已在本网站解决,但无法解决这个问题。如果有人能帮助我,我真的很感激。
我在Access 2010女士中有一个交叉表查询,我想转换到MySQL。我不熟悉MYSQL中的交叉表。
我的MS-Access交叉表是;
TRANSFORM Count(AppNamesAndAllUsers_QRY.User_Name) AS CountOfUser_Name
SELECT Tbl_HRList.[Organizational Code], Tbl_HRList.[Organizational Unit], Tbl_HRList.Team, Count(AppNamesAndAllUsers_QRY.User_Name) AS [Total Of User Name]
FROM Tbl_HRList INNER JOIN AppNamesAndAllUsers_QRY ON Tbl_HRList.Employee_ID = AppNamesAndAllUsers_QRY.Employee_ID
WHERE (((AppNamesAndAllUsers_QRY.User_Status)="Active"))
GROUP BY Tbl_HRList.[Organizational Code], Tbl_HRList.[Organizational Unit], Tbl_HRList.Team, AppNamesAndAllUsers_QRY.User_Status
PIVOT AppNamesAndAllUsers_QRY.Application_Name;
如何将此查询转换为MYSql?
提前致谢