How to find when a customer first started doing business with you in SQL

Hi, 

I am to find when a customer first started doing business with my company in the MySQL db. I am pretty new to sugar's database I figured I would ask on here to save some time and frustration.  Are there any resources for figuring out how the database's relationships work?  I noticed that each modules have about 5 tables and they're used to relate to other tables but I am not completely clear on how everything is set up. If anyone can shed some light on this it would be very appreciated.

Thanks

  • The database schema is documented here:

    SchemaSpy - ab1520b7

    As for your initial question, that's a bit trickier to answer. You first must define how it is that your organization considers that someone is actually doing business with you. For example, is someone doing business with you the moment they are entered into a specific module in Sugar? If so, which module? Or is it in relation to Opportunities, that is, someone is doing business with you when you close an opportunity?

    Without some understanding of how you use Sugar and your business processes, it is difficult to tell you which tables you should query for that information.