Counting many-to-many items
Hello, any suggestions how should I query for item and count the numbers of times it is referenced via many-to-many table?
Given these tables:
Solution:Jump to solution
I ended up doing this:
```js
const items = await db
.select({
...getTableColumns(A),...
2 Replies