select lg.cont_id,c.contact_name,a.addr_line_one,lg.loc_group_tp_code,au.name
from address as a, locationgroup as lg ,addressgroup ag,contact c,cdaddrusagetp au
where a.address_id=ag.address_id
and ag.location_group_id=lg.location_group_id
and c.cont_id=lg.cont_id
and au.addr_usage_tp_cd=ag.addr_usage_tp_cd
order by lg.cont_id;

Sample output:

address_sql_1

Advertisements