CREATE VIEW "SBODEMODE"."B1_JournalEntryCustomerView" ( "TransId", "CardCodeMin", "CardCodeMax" ) AS SELECT T0."TransId" AS "TransId", MIN(T1."CardCode") AS "CardCodeMin", MAX(T1."CardCode") AS "CardCodeMax" FROM  "SBODEMODE"."JDT1" T0  INNER  JOIN "SBODEMODE"."OCRD" T1  ON  T0."ShortName" <> T0."Account"  AND  T1."CardCode" = T0."ShortName"  AND  (T1."CardType" = 'C'  OR  (T1."CardType" = 'S'  AND  T1."sEmployed" = 'Y' ))  GROUP BY T0."TransId" WITH READ ONLY