Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
mahnoor1279
Contributor III
Contributor III

How to get only first account name of customer which has minimum account open date but having same contact number

Hey all,

I have got the data with minimum account_open_date  

CUSTOMER_ACCOUNT_TABLE:

LOAD
CUST_ACCT_SNO, /
FIRST_NAME,
CUST_TYPE,
EDUCATION,
COUNTRYSNO,
CUST_ACCT_TITLE,
ONLINE_ACCT_CAT_LIMIT_SNO,
CUST_ACCT_CODE,
ACCOUNT_CATEGORY,
ACCOUNT_TYPE_SNO,
ACCT_OPEN_DATE,
SOURCE_TYPE,
CITY_NAME,
STATE_NAME,
COUNTRY_NAME,
ACCOUNT_TYPE_NAME,
FROM ....... .qvd](qvd);


Unqualify *;

inner join

LOAD
CUST_ADDRESS_SNO,
CUST_SNO,
CUST_ADDRESS_TYPE,
ST_ADD1,
ST_ADD2,
BLOCK,
MILESTONE,
POSTAL_CODE,
AREA_SNO,
CITY_SNO,
STATE_SNO,
COUNTRY_SNO,
DEFUALT_ADDRESS,
PO_BOX_NO,
CUST_ACCT_CODE,
 CONTACT_NO,
CUST_OFFICE_PHONE,
CUST_RESIDENCE_PHONE,
CUST_EMAIL,
FAX_NO,
CUST_ALT_EMAIL,
CUST_ACCT_SNO,
ENTER_DATE,
ENTER_BY,
EMAIL_INACTIVE,
UPDATE_FROM,
CRM_STATUS
FROM......qvd]

RIGHT Join

 


NEW_TEMP:
Load
FIRST_NAME,
//min([CUST_ACCT_SNO]) as CUST_ACCT_SNO,
min([ACCT_OPEN_DATE]) as ACCT_OPEN_DATE

resident CUSTOMER_ACCOUNT_TABLE group by FIRST_NAME;

 

 

 

This is the script which i've load to get  only first account with having minimum acct_open_date with the sam contact_no

 

 

but i got this(in attachment)

Labels (3)
0 Replies