SELECT 0 orders_id,
a.customers_id , 
concat(a.entry_firstname ,' ' , a.entry_lastname) customers_name, 
a.entry_company customers_company, 
a.entry_street_address customers_street_address, 
a.entry_suburb customers_suburb, 
a.entry_city customers_city, 
a.entry_postcode customers_postcode, 
a.entry_state customers_state, 
d.countries_name customers_country, 
c.customers_telephone, 
c.customers_email_address, 
0 customers_address_format_id, 
'' delivery_name, 
'' delivery_company, 
'' delivery_street_address, 
'' delivery_suburb, 
'' delivery_city, 
'' delivery_postcode, 
'' delivery_state, 
'' delivery_country, 
'' delivery_address_format_id, 
'' billing_name, 
'' billing_company, 
'' billing_street_address, 
'' billing_suburb, 
'' billing_city, 
'' billing_postcode, 
'' billing_state, 
'' billing_country, 
0 billing_address_format_id, 
'' payment_method, 
'' cc_type, 
'' cc_owner, 
'' cc_number, 
'' cc_expires, 
null  last_modified, 
null  date_purchased, 
0 orders_status, 
null orders_date_finished, 
'' currency, 
'' currency_value
 from <@PREFIX>customers c 
join  <@PREFIX>address_book a 
on c.customers_id = a.Customers_id 
join <@PREFIX>countries d on a.entry_country_id = d.countries_id
join customers_info e on e.customers_info_id = c.customers_id
where a.address_book_id = 
(select min(b.address_book_id) from <@PREFIX>address_book b where b.customers_id = c.Customers_id)

