/*
-- Query: select 
distinct 
fmg.serial_fml,
serial_ste,
serial_cnt,
serial_par,
serial_zne,
main_street_gda as main_street_fma,
number_gda as number_fma,
concat("'",secondary_street_gda,"'") as secondary_street_fma,
sector as sector_fma,
address_type_gda as address_type_fma,
phone1_gda as phone1_fma,
ext_phone1_gda as ext_phone1_fma,
phone2_gda as phone2_fma,
ext_phone2_gda as ext_phone2_fma,
main_address_gda as main_address_fma,
reference as refenece_fma,
city as city_fma,
status_gda as status_fma,
coordinate_w as coordinate_w_fma,
coordinate_s as coordinarte_f_fma
from guardian_address gda
join guardian grd on gda.serial_grd=grd.serial_grd
join family_guardian fmg on grd.serial_grd=fmg.serial_grd
where status_gda='ACTIVE' 
-- and main_street_gda !=''
  -- and gda.serial_grd in(3411,3410)
-- and concat(main_street_gda,' ',number_gda,'', secondary_street_gda) in 
-- (select distinct concat(ss.main_street_gda,' ',ss.number_gda,'', ss.secondary_street_gda) from guardian_address ss
-- where ss.serial_grd=);
  group by serial_fml,main_street_fma,number_fma,secondary_street_fma
-- Date: 2016-06-01 10:28
*/