Author Archives: Brian Wilhelm

About Brian Wilhelm

I am a web entrepreneur, internet addict, e-commerce lover, and music fan. I currently work for a Internet Retailer 500 E-commerce site, managing email marketing, social media, and mobile marketing. In the past, I worked as an Internet Marketing Director, Design Director, Web Developer, and Product Designer.

Q&A: Can you do a nested SQL query in Responsys?

Although I have not heard this directly from Responsys, I believe you can execute any SELECT statements that can normally be executed on an ORACLE database. We run this SQL statement, where you can see nested select statements:

SELECT * FROM ( SELECT RANK() OVER (PARTITION BY A.EMAIL_ADDRESS_ ORDER BY A.CREATED_DATE_) RNK, A.* FROM $A$ A JOIN (SELECT EMAIL_ADDRESS_ FROM $A$ GROUP BY EMAIL_ADDRESS_ HAVING count(EMAIL_ADDRESS_) > 1) B ON (A.EMAIL_ADDRESS_ = B.EMAIL_ADDRESS_) ) WHERE RNK <> 1