Adimpact.com

The One That Didn’t Get Away: Finding The Last Time You Visited A Client or Prospect

October 4, 2007

in GoldMine Tips, SQL Query

Here’s a very handy SQL Query to find the last time you met with your contacts… Go to Lookup | SQL Queries and paste this into the Top ½ of the Window:

select contact1.company, contact1.contact, contact1.key1, conthist.userid, conthist.ondate, conthist.ref from contact1, conthist where contact1.accountno = conthist.accountno and conthist.recid in (select max(recid) from conthist where srectype = ‘A’ group by accountno) order by key1, ondate

SQL Query Window

Then Click Query!

Don’t Forget you can Send the Results of the Query to Excel with a Right-Click | Output to Excel.

Send to Excel

This and over 60 other very use queries are await you in The GoldMine Guide to SQL Queries!

GoldMine Guide to SQL Queries

PS – Don’t forget about the GoldMine Premium Edition Webinar Coming up on Tuesday!

http://www.thegmblog.com/premium

Previous post: GoldMine Premium Edition - Special Web Event!

Next post: The Skinny To Go: Contact Details Printed