     property_qualifier as qualifier,
     min(v.property_accuracy) as accuracy
   FROM 
-    darwin_flat as flat
-    INNER JOIN gtu ON flat.gtu_ref = gtu.id
-    INNER JOIN catalogue_properties c ON referenced_relation = 'gtu' AND record_id = gtu.id
-    INNER JOIN properties_values v ON property_ref = c.id 
+    darwin2.darwin_flat as flat
+    INNER JOIN darwin2.gtu ON flat.gtu_ref = gtu.id
+    INNER JOIN darwin2.catalogue_properties c ON referenced_relation = 'gtu' AND record_id = gtu.id
+    INNER JOIN darwin2.properties_values v ON property_ref = c.id 
   WHERE 
     property_type != 'geo position' and property_sub_type not in ('height', 'altitude', 'depth')
 

(
  SELECT * ,

  ( SELECT entry || ' ' || zip_code  || ' ' || locality  || ' ' || country FROM people_addresses where  person_user_ref = p.id ORDER BY tag like '%pref%'LIMIT 1) as address,
  ( SELECT entry FROM people_comm where person_user_ref = p.id    and comm_type='e-mail' ORDER BY tag like '%pref%' LIMIT 1) as email

  from people p
  

    null::timestamp as notion_date,
    '' as determination_status,
    true as is_current
    FROM  darwin2.darwin_flat  f
    WHERE NOT EXISTS( SELECT 1 FROM darwin2.identifications_abdc i WHERE taxon_ref is not null and i.flat_id = f.id)
);


