select
        min(potbath1_.Metal_Height) as col_0_0_,
        min(bathan3_.Cr) as col_1_0_,
        smelter7_.Name as col_2_0_ 
    from
        PotDates potdates0_ cross 
    join
        Pot pot5_ cross 
    join
        Room room6_ cross 
    join
        Smelter smelter7_ 
    left outer join
        PotBath potbath1_ 
            on (
                potbath1_.Date_Trunc=potdates0_.Date_Trunc 
                and potbath1_.Pot_ID=potdates0_.Pot_ID 
                and potbath1_.Room_ID=potdates0_.Room_ID 
                and potbath1_.Smelter_ID=potdates0_.Smelter_ID
            ) 
    left outer join
        PotDates potdates2_ 
            on potbath1_.Date_Trunc=potdates2_.Date_Trunc 
            and potbath1_.Pot_ID=potdates2_.Pot_ID 
            and potbath1_.Room_ID=potdates2_.Room_ID 
            and potbath1_.Smelter_ID=potdates2_.Smelter_ID 
    left outer join
        BathAn bathan3_ 
            on (
                bathan3_.Date_Trunc=potdates0_.Date_Trunc 
                and bathan3_.Pot_ID=potdates0_.Pot_ID 
                and bathan3_.Room_ID=potdates0_.Room_ID 
                and bathan3_.Smelter_ID=potdates0_.Smelter_ID
            ) 
    left outer join
        PotDates potdates4_ 
            on bathan3_.Date_Trunc=potdates4_.Date_Trunc 
            and bathan3_.Pot_ID=potdates4_.Pot_ID 
            and bathan3_.Room_ID=potdates4_.Room_ID 
            and bathan3_.Smelter_ID=potdates4_.Smelter_ID 
    where
        potdates0_.Pot_ID=pot5_.Pot_ID 
        and potdates0_.Room_ID=pot5_.Room_ID 
        and potdates0_.Smelter_ID=pot5_.Smelter_ID 
        and pot5_.Room_ID=room6_.Room_ID 
        and pot5_.Smelter_ID=room6_.Smelter_ID 
        and room6_.Smelter_ID=smelter7_.Smelter_ID 
    group by
        smelter7_.Name