0
次のSQL ServerクエリをMySQLに変換する方法はありますか? MySQLのでMySQLの代わりにCOUNT(*)OVER(PARTITION BY mct.MasterTableid)の代わりに
COUNTためSELECT mct.MasterTableid,
mct.MasterTablename,
mct.MasterTableorderid,
ct.CategoryTableid,
ct.CategoryTablename,
ct.CategoryTableorderid,
COUNT(*) OVER (PARTITION BY mct.MasterTableid) AS CoursesCount,
COUNT(scct.CategoryTabledetailid) AS ChaptersCount
FROM MasterTable tm
INNER JOIN CategoryTable t
ON ct.MasterTableid = mct.MasterTableid
INNER JOIN SubCategoryTable td
ON ct.CategoryTableid = scct.CategoryTableid
WHERE ct.isdeleted = 0
AND mct.isdeleted = 0
AND scct.isdeleted = 0
GROUP BY mct.MasterTableid,
mct.MasterTablename,
mct.MasterTableorderid,
ct.CategoryTableid,
ct.CategoryTablename,
ct.CategoryTableorderid
ORDER BY mct.MasterTableorderid,
ct.CategoryTableorderid
オルタナティブ(*)OVER(mct.MasterTableid BY PARTITION)
を使用することができます – Lynnw