Did you ever create a custom inventory class and not know where it is in the database? Or, for that matter, any custom data class?
The easiest way I've found to deal with this is to find a resource that the data class is associated with (for example, a computer for a custom inventory class).
Go into Resource Explorer for that asset, and select the Inventory tab. Find the data class (often under the "Default Folder"). Then you will receive the table over to the right. Notice above the results for the dataclass there are two tabs. Choose the "Status" tab and it will give you some stats, including both the Table name and the History table names.
You can then write a query using these table names in your hand-written SQL.