Has anyone done a multi-year sql data dump from Sage50 Premium?

Just as it says. Exact scenario is that the client is switching from Sage50 to an industry specific software and would like to bring in all their transactional history. This is definitely going to require an SQL query across multiple tables and I have no idea how to do this. Is there anyone out there that can? Honestly, I think it's a bad idea, but I have to ask...