What should a field in another count table do in an sequelize association query?

2 tables
select
tb1.name as name,
tb1.id as id,
(select count (1) from tb2 where tb1.type = tb2.type) as count
from tb1

clipboard.png

how to implement the sequelize method, and how to get such a result
is using include, and how to write where.

Apr.02,2021

use include

Menu