我有这个显示ORA-00979:not a GROUP BY expression
错误的查询。
我不是 sql pro 所以请你给我一个提示有什么问题吗?
SELECT *
FROM (SELECT a.*, ROWNUM r___
FROM (SELECT DISTINCT "SMTAPP"."XF_MASTER"."ID" AS "XfMasterEntityId",
"SMTAPP"."XP_MASTER_DETAIL"."WIFENAME" AS "XpMasterDetailEntityWifename",
"SMTAPP"."XP_MASTER_DETAIL"."COUNT" AS "XpMasterDetailEntityCount",
MAX ("SMTAPP"."XP_MASTER_DETAIL"."COUNT") AS "XpMasterDetailEntityCountMax"
FROM ("SMTAPP"."XF_MASTER" LEFT JOIN "SMTAPP"."XP_MASTER_DETAIL"
ON "SMTAPP"."XF_MASTER"."ID" = "SMTAPP"."XP_MASTER_DETAIL"."XF_MASTER_ID")
GROUP BY "SMTAPP"."XP_MASTER_DETAIL"."COUNT"
ORDER BY "SMTAPP"."XF_MASTER"."ID" ASC) a
WHERE ROWNUM < '11')
WHERE r___ >= '1'