INSERT INTO public.scrooge_eats_orders
SELECT 10000,ID.id,now(),0
FROM
(
    SELECT S.id FROM public.scrooge_eats_accounts AS S,public.companies AS C
    WHERE C.name = 'DTF' AND S.company_id = C.id
) AS ID
