CREATE OR REPLACE VIEW food600.spredcenydane
AS
 SELECT karty.c_karty, 
    round(karty.cena01,2) AS cena,
    1 AS hladina,
    karty.c_mena,
	skupiny.dan01 as dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena02,2) AS cena,
    2 AS hladina,
    karty.c_mena,
	skupiny.dan02 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena03,2) AS cena,
    3 AS hladina,
    karty.c_mena,
 	skupiny.dan03 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena04,2) AS cena,
    4 AS hladina,
    karty.c_mena,
	skupiny.dan04 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena05,2) AS cena,
    5 AS hladina,
    karty.c_mena,
	skupiny.dan05 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena06,2) AS cena,
    6 AS hladina,
    karty.c_mena,
	skupiny.dan06 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena07,2) AS cena,
    7 AS hladina,
    karty.c_mena,
	skupiny.dan07 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena08,2) AS cena,
    8 AS hladina,
    karty.c_mena,
	skupiny.dan08 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena09,2) AS cena,
    9 AS hladina,
    karty.c_mena,
	skupiny.dan09 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena10,2) AS cena,
    10 AS hladina,
    karty.c_mena,
	skupiny.dan10 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena11,2) AS cena,
    11 AS hladina,
    karty.c_mena,
	skupiny.dan11 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena12,2) AS cena,
    12 AS hladina,
    karty.c_mena,
	skupiny.dan12 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena13,2) AS cena,
    13 AS hladina,
    karty.c_mena,
	skupiny.dan13 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena14,2) AS cena,
    14 AS hladina,
    karty.c_mena,
	skupiny.dan14 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena15,2) AS cena,
    15 AS hladina,
    karty.c_mena,
	skupiny.dan15 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena16,2) AS cena,
    16 AS hladina,
    karty.c_mena,
	skupiny.dan16 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena17,2) AS cena,
    17 AS hladina,
    karty.c_mena,
	skupiny.dan17 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena18,2) AS cena,
    18 AS hladina,
    karty.c_mena,
	skupiny.dan18 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena19,2) AS cena,
    19 AS hladina,
    karty.c_mena,
	skupiny.dan19 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena20,2) AS cena,
    20 AS hladina,
    karty.c_mena,
	skupiny.dan20 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena21,2) AS cena,
    21 AS hladina,
    karty.c_mena,
	skupiny.dan21 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena22,2) AS cena,
    22 AS hladina,
    karty.c_mena,
	skupiny.dan22 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena23,2) AS cena,
    23 AS hladina,
    karty.c_mena,
	skupiny.dan23 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena24,2) AS cena,
    24 AS hladina,
    karty.c_mena,
	skupiny.dan24 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena25,2) AS cena,
    25 AS hladina,
    karty.c_mena,
	skupiny.dan25 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena26,2) AS cena,
    26 AS hladina,
    karty.c_mena,
	skupiny.dan26 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena27,2) AS cena,
    27 AS hladina,
    karty.c_mena,
	skupiny.dan27 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena28,2) AS cena,
    28 AS hladina,
    karty.c_mena,
	skupiny.dan28 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena29,2) AS cena,
    29 AS hladina,
    karty.c_mena,
	skupiny.dan29 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena30,2) AS cena,
    30 AS hladina,
    karty.c_mena,
	skupiny.dan30 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena31,2) AS cena,
    31 AS hladina,
    karty.c_mena,
	skupiny.dan31 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena32,2) AS cena,
    32 AS hladina,
    karty.c_mena,
	skupiny.dan32 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena33,2) AS cena,
    33 AS hladina,
    karty.c_mena,
	skupiny.dan33 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena34,2) AS cena,
    34 AS hladina,
    karty.c_mena,
	skupiny.dan34 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena35,2) AS cena,
    35 AS hladina,
    karty.c_mena,
	skupiny.dan35 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena36,2) AS cena,
    36 AS hladina,
    karty.c_mena,
	skupiny.dan36 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena37,2) AS cena,
    37 AS hladina,
    karty.c_mena,
	skupiny.dan37 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena38,2) AS cena,
    38 AS hladina,
    karty.c_mena,
	skupiny.dan38 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena39,2) AS cena,
    39 AS hladina,
    karty.c_mena,
	skupiny.dan39 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0
UNION
 SELECT karty.c_karty,
    round(karty.cena40,2) AS cena,
    40 AS hladina,
    karty.c_mena,
	skupiny.dan40 AS dan,
    karty.c_data
   FROM food600.karty inner join food600.skupiny on karty.c_druhk=skupiny.c_druh where karty.c_druhk>0

