Database view one row per document

I would like to build a SQL View looking at a PDM vault where each document in the vault is represented as one row. Each row showing the most up to date information for that document or what I would see if I went to the document did a “Get Latest Version”. The problem I have is that I always end up with multiple rows for each document. 

SolidworksSolidworks Pdm/enterprise Pdm