sql query to find all parts in solidworks assembly

Has anyone successfully wrote a sql query that will display all parts of an assembly along with , quantity, version, and state?

SolidworksSolidworks Pdm enterprise Pdm