阅读背景:

使用sql进行递归计算以形成树

来源:互联网 

I am working on a simple problem and wanted to solve it using SQL. I am having 3 tables Category, Item & a relational table CategoryItem. I need to return count of items per category but the twist is Categories are arranged in Parent-Child relationships and the count of items in child categories should be added to the count in its parent Category. Please consider the sample data below and the expected resultset using SQL.I am working on a simple problem and wanted to




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: