How many documents are with document type code BK for each product id?
create table documents (project_id varchar, document_type_code varchar, PRIMARY KEY (project_id))
select count(*), project_id from documents where document_type_code = "bk" group by project_id