Adimpact.com

SQL Query for Ignored Accounts

October 16, 2015

in GoldMine Tips,SQL Query

I received this question from a long time blog reader, “Do you have a SQL Query that can list the Companies where there has been NO CHANGE, no pending record entered or History Record in the last year?” Well, no I don’t, asics gel pas cher but let’s see what we can do! So here’s the query:

SELECT c1.company, c1.contact,  Nike Free Run 3.0 femme c1.phone1, c1.address1,  asics gel lyte 3 c1.city,  louboutin chaussures c1.state,  Parajumpers Femme Californian Joanna c1.zip, c1.key1, c1.accountno FROM contact1 c1 WHERE lastdate < getdate() - 365 AND c1.accountno NOT IN (SELECT accountno FROM cal WHERE createon >= getdate() - 365) AND c1.accountno NOT IN (SELECT accountno FROM conthist WHERE createon >= getdate() - 365) AND c1.key1 <> 'Unqualified' ORDER BY c1.company, c1.contact 

Ignored Accounts SQL So a couple of things to note. Air Jordan 1 bambini You’ll notice I’m using getdate() – 365 to automatically go back one year, you could replace this with a date, Adidas Zx 500 Homme e.g. < 1/1/2015, adidas hamburg homme if you want to hard code the dates. Also, I am excluding any contact marked Unqualified in the key1 field for those contacts that you do not want to contact often.

Previous post:

Next post: