SELECT 'Fornecedores' as tipo, count(*) as qtdd, '19' as expected
FROM fornecedores_empresas
WHERE codigo IN (10, 12, 32, 59, 118, 119, 209, 219, 233, 237, 238, 239, 243, 244, 245, 246, 247, 248, 543);

SELECT 'Despesas' as tipo, count(*) as qtdd, '10' as expected
FROM cadastro_plano_de_contas_itens
WHERE conta_reduzida IN (395, 543, 554, 576, 579, 618, 663, 699, 767, 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 = 59 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() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 237 LIMIT 1), '285209', '2020-03-02', 4999, 'Compra bateria parcela 06/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 = 238 LIMIT 1), '', '2020-03-26', 10000, 'Curso Maris 04/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 = 12 LIMIT 1), '7438791', '2020-06-15', 5826, 'Compra Tonner 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 = 245 LIMIT 1), '4974369', '2020-06-30', 1.27491, 'Parc 002/012', (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 = 543 LIMIT 1), '', '2020-07-24', 1.25000, 'Anúncio TPO', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 767 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 219 LIMIT 1), '277900', '2020-07-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 = 219 LIMIT 1), '297359', '2020-07-27', 2290, '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), '297359', '2020-07-27', 2290, '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 = 118 LIMIT 1), '', '2020-07-28', 2.00000, 'Anúncio TPO', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 767 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 10 LIMIT 1), '', '2020-08-01', 18264, '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-08-03', 44947, '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-08-03', 31912, '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-08-03', 13034, '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-08-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 = 239 LIMIT 1), '', '2020-08-11', 14300, 'Usar o mesmo CD do mês passado', (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 = 247 LIMIT 1), '496.738', '2020-08-11', 8240, 'Filtro Purificador', (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 = 118 LIMIT 1), '', '2020-08-13', 2.08014, 'Anúncio TPO', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 767 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 248 LIMIT 1), '1897', '2020-08-13', 78000, 'Conserto 02 Macs - MACKBOOK PRO 15 – 2012', (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 = 233 LIMIT 1), '5708', '2020-08-13', 20000, 'Vaga Social Midia', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 395 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 239 LIMIT 1), '', '2020-08-15', 14175, 'Usar o mesmo CD do mês passado', (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 = 244 LIMIT 1), '', '2020-08-15', 8499, 'Usar o mesmo CD do Streamyard', (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 = 243 LIMIT 1), '35479', '2020-08-15', 7990, '', (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 = 239 LIMIT 1), '', '2020-08-15', 14175, 'Usar o mesmo CD do mês passado', (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 = 246 LIMIT 1), '', '2020-08-16', 39900, '', (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-08-18', 20000, 'Anúncio TPO', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 767 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 118 LIMIT 1), '', '2020-08-18', 3.00000, 'Anúncio TPO', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 767 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 219 LIMIT 1), '309903', '2020-08-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), '314293', '2020-08-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 = 209 LIMIT 1), '', '2020-08-27', 46241, 'Getty Images - 12/12', (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), '', '2019-10-31', 31115, 'Compra Rack 08/10', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 579 LIMIT 1), 1, 3, NOW(), NOW() );
