You might want to edit that query, as it has filters and sorting that was no where in either of the queries the OP posted. It's a query on those two DMVs sure, but it's not the same as what the OP wants.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability