$ 0 0 Try this create table test1 as (SELECT * from connection to tera2 (select a.SRC_CUST_ID as custid, a.CUST_NM as name FROM db.CUST a WHERE a.SRC_CUST_ID= 'xxxxxxxxx' GROUP BY a.SRC_CUST_ID, a.CUST_NM )dt)with data and stats;
Try this
create table test1 as
(SELECT * from connection to tera2
(select
a.SRC_CUST_ID as custid,
a.CUST_NM as name
FROM db.CUST a
WHERE a.SRC_CUST_ID= 'xxxxxxxxx'
GROUP BY a.SRC_CUST_ID,
a.CUST_NM
)dt)with data and stats;