Hello,
Is this SQL server data you are talking about? If yes, then I can provide you the query in SQL Server only. Please let me know if that'll work for you or do you want it Visual Basic only? I have experience in VB but unfortunately don't have the software installed. Please let me know.
If a SQL query works for you, I'll need the database backup file (.bak) so that I can install that in my local system and work out the query.
Best regards,
Swagata