select * from (select d1.* from Good g1,Data d1 where g1.datano=d1.datano union select d1.* from Item i1,Data d1 where i1.datano=d1.datano)