SELECT 'Fornecedores' as tipo, count(*) as qtdd, '12' as expected
FROM fornecedores_empresas
WHERE codigo IN (10, 32, 186, 204, 207, 209, 219, 221, 223, 231, 237, 238);

SELECT 'Despesas' as tipo, count(*) as qtdd, '9' as expected
FROM cadastro_plano_de_contas_itens
WHERE conta_reduzida IN (543, 576, 579, 618, 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 = 207 LIMIT 1), '', '2019-08-08', 9006, 'Curso Maris 09/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 08/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 = 204 LIMIT 1), '1409333', '2019-09-25', 57980, 'Notebook\'s e PC\'s 07/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 = 231 LIMIT 1), '', '2019-10-31', 31115, 'Compra Rack 05/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), '12208', '2019-11-17', 22617, 'Parcela 06/06', (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 = 219 LIMIT 1), '113929', '2020-04-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 = 219 LIMIT 1), '', '2020-04-17', 4629, '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 = 219 LIMIT 1), '', '2020-04-14', 12860, '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 = 221 LIMIT 1), '', '2020-04-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 = 32 LIMIT 1), '', '2020-04-03', 45469, '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-04-03', 32283, '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-04-03', 13186, '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 = 10 LIMIT 1), '', '2020-04-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 = 223 LIMIT 1), '', '2020-03-31', 10935, '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), '', '2020-03-31', 10935, '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), '', '2020-03-31', 10935, '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), '', '2020-03-31', 10935, '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), '', '2020-03-31', 10935, '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 = 238 LIMIT 1), '', '2020-06-26', 10000, 'Curso Maris 01/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 = 223 LIMIT 1), '', '2020-03-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 = 237 LIMIT 1), '285209', '2020-03-02', 4999, 'Compra bateria parcela 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 = 10 LIMIT 1), '2197438', '2020-02-20', 5900, 'Nespresso Parcela 01/04', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 576 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 10 LIMIT 1), '', '2020-01-21', 4875, 'Renovação Assinatura Anual', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 618 LIMIT 1), 1, 3, NOW(), NOW() );
