CREATE OR REPLACE VIEW food600.smrtvolyobraty
 AS
 SELECT smaxcdoklckarty.c_data,
    smaxcdoklckarty.c_karty,
    smaxcdoklckarty.c_dokl,
    doklady.kdy
   FROM food600.smaxcdoklckarty
     JOIN food600.doklady ON smaxcdoklckarty.c_dokl = doklady.c_dokl AND smaxcdoklckarty.c_data = doklady.c_data;
