SELECT 'Fornecedores' as tipo, count(*) as qtdd, '27' as expected
FROM fornecedores_empresas
WHERE codigo IN (10, 32, 57, 59, 119, 186, 203, 204, 207, 208, 210, 215, 216, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 231, 232, 233);

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

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 --
  ( NULL, '584098', '2019-06-26', 23125, 'Curso Guilherme - 06/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 = 208 LIMIT 1), '250180', '2019-08-09', 20541, 'Curso Maris 06/06', (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 = 57 LIMIT 1), '116258', '2018-07-25', 46241, 'parcela 05/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 04/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 04/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 = 215 LIMIT 1), '', '2019-10-01', 191250, 'Compra cadeiras 04/04', (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 = 186 LIMIT 1), '', '2019-10-04', 48502, 'Compras reforma 04/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 = 216 LIMIT 1), '2658332', '2019-10-08', 36729, 'Compra Reforma 04/05', (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 = 217 LIMIT 1), '267', '2019-10-11', 43750, 'Conserto tubulação 04/04', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 559 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 228 LIMIT 1), '42896', '2019-10-18', 23250, 'Compra e instalação tapete 04/04', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 580 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 186 LIMIT 1), '12208', '2019-11-17', 22617, 'Parcela 03/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 = 203 LIMIT 1), '5667110', '2019-11-25', 32631, 'Compra Switch - parcela 02/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 = 218 LIMIT 1), '745440', '2019-10-16', 8952, 'Compra bateria 04/04', (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), '745440', '2019-10-16', 1823, 'Frete bateria 04/04', (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 = 229 LIMIT 1), '', '2019-10-29', 29017, 'Microfone 03/03', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 580 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 231 LIMIT 1), '', '2019-10-31', 31115, 'Compra Rack 02/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 = 221 LIMIT 1), '', '2019-11-28', 12900, 'Compra brindes funcionários - 02/03', (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 = 225 LIMIT 1), '582938', '2019-12-06', 2563, 'telefone sem fio - 02/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 - 02/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 - 02/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 = 227 LIMIT 1), '', '2019-12-06', 43350, 'Brindes funcionários - 02/02', (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 = 232 LIMIT 1), '', '2019-12-23', 8360, 'Panéis de controle', (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), '', '2019-12-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 = 220 LIMIT 1), '', '2019-12-26', 49900, 'Curso Rodrigo', (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 = 223 LIMIT 1), '', '2019-12-31', 14659, '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 = 223 LIMIT 1), '', '2019-12-31', 14659, '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 = 223 LIMIT 1), '', '2019-12-31', 14659, '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-01-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 = 32 LIMIT 1), '', '2020-01-03', 33984, '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-01-03', 24128, '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-01-03', 9855, '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 = 233 LIMIT 1), '4760', '2020-01-06', 49900, 'Anuncio de vaga', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 858 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 119 LIMIT 1), '', '2019-11-08', 699, '', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 543 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 219 LIMIT 1), '', '2020-01-21', 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 = 59 LIMIT 1), '', '2020-01-22', 4875, 'Renovação Assinatura Anual', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 618 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 219 LIMIT 1), '', '2020-01-22', 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 = 219 LIMIT 1), '', '2020-01-22', 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 = 219 LIMIT 1), '', '2020-01-22', 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 = 219 LIMIT 1), '', '2020-01-22', 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 = 219 LIMIT 1), '', '2020-01-22', 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 = 232 LIMIT 1), '', '2020-01-23', 8360, 'Panéis de controle', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 554 LIMIT 1), 1, 3, NOW(), NOW() );
