SELECT 'Fornecedores' as tipo, count(*) as qtdd, '19' as expected
FROM fornecedores_empresas
WHERE codigo IN (10, 32, 119, 186, 203, 204, 205, 206, 207, 209, 210, 218, 219, 221, 225, 226, 233, 234, 235);

SELECT 'Despesas' as tipo, count(*) as qtdd, '13' as expected
FROM cadastro_plano_de_contas_itens
WHERE conta_reduzida IN (74, 548, 549, 554, 560, 579, 623, 638, 663, 697, 699, 765, 799);

INSERT INTO financeiro_contas_fornecedores ( --
    fornecedor_id,
    nota_fiscal,
    data,
    valor,
    nome,
    plano_de_contas_id,
--
#     centros_de_custo_cadaris_id,
#     forma_pagamento,
#     boleto,
    pago, -- =1
#     comprovante,
    conta_id, -- =3
    created_at, -- =NOW()
    updated_at -- =NOW()
)
    VALUES --
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 205 LIMIT 1), '584098', '2019-06-26', 23125, 'Curso Guilherme - 08/08', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 74 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 207 LIMIT 1), '', '2019-08-08', 9006, 'Curso Maris 07/12', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 799 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 209 LIMIT 1), '116258', '2018-07-25', 46241, 'parcela 06/12', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 697 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 210 LIMIT 1), '196698', '2019-09-25', 57833, 'Compra tintas 05/06', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 560 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 204 LIMIT 1), '1409333', '2019-09-25', 57980, 'Notebook\'s e PC\'s 05/10', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 765 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 186 LIMIT 1), '', '2019-10-04', 48502, 'Compras reforma 05/06', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 548 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 186 LIMIT 1), '2658332', '2019-10-08', 36729, 'Compra Reforma 05/05', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 548 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 233 LIMIT 1), '', '2019-10-31', 31115, 'Compra Rack 03/10', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 579 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 186 LIMIT 1), '2658332', '2019-10-08', 36729, 'Compra Reforma 05/05', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 548 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 203 LIMIT 1), '5667110', '2019-11-25', 32631, 'Compra Switch - parcela 03/03', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 579 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 221 LIMIT 1), '', '2019-11-28', 12900, 'Compra brindes funcionários - 03/03', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 638 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 225 LIMIT 1), '582938', '2019-12-06', 2563, 'telefone sem fio - 03/03', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 623 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 225 LIMIT 1), '493629', '2019-12-06', 7727, 'telefone sem fio - 03/03', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 623 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 225 LIMIT 1), '582938', '2019-12-06', 196, 'frete', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 549 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 226 LIMIT 1), '', '2019-12-05', 18997, 'Caixas Sorrir Muda tudo - 03/04', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 638 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 234 LIMIT 1), '', '2020-01-24', 22638, 'Compra de imagens', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 697 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 235 LIMIT 1), '', '2020-01-25', 19700, 'comunicação e dados', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 554 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 219 LIMIT 1), '127074', '2020-01-25', 2840, 'Contratação de ferramenta', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 663 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 206 LIMIT 1), '', '2020-01-31', 15392, 'Analise de SEO', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 663 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 206 LIMIT 1), '', '2020-01-31', 15392, 'Analise de SEO', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 663 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 206 LIMIT 1), '', '2020-01-31', 15392, 'Analise de SEO', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 663 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 10 LIMIT 1), '', '2020-02-01', 11602, 'Hospedagem', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 699 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 218 LIMIT 1), '4253', '2020-02-03', 60160, 'Compra Tonner', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 579 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 218 LIMIT 1), '4253', '2020-02-03', 2975, 'frete', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 549 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 32 LIMIT 1), '', '2020-02-03', 38055, 'Hospedagem', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 699 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 32 LIMIT 1), '', '2020-02-03', 27019, 'Hospedagem', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 699 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 32 LIMIT 1), '', '2020-02-03', 11036, 'Hospedagem', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 699 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 119 LIMIT 1), '', '2020-02-08', 699, '', NULL, 1, 3, NOW(), NOW() ),
  ( NULL, '', '2020-02-11', 21500, 'Compra de imagens', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 697 LIMIT 1), 1, 3, NOW(), NOW() );
