Saturday, December 1, 2018

Sample query to Extract Customers Records that were Transformed from Lead Records

Below is a sample query:
 
SELECT * FROM customers WHERE customer_id IN(
SELECT DISTINCT entity_id FROM entity e
INNER JOIN entity_status_history s oN e.ENTITY_ID=s.ENTITY_ID
WHERE s.COMMENT_0='Creating Lead record ')
AND CATEGORY_0='CUSTOMER'

No comments:

Post a Comment