I respect anyone that will take the time to publish knowledge and, no... this isn't a slam. Just some helpful hints for your next post.
I think your script would have gotten better marks if you remembered the special but simple handling for the ResourceDB (which is what MS called it in one of their sample scripts) and if you had done your ORDER BY based on the column alias instead of repeating the formula. Also, you can easily convert page counts to megabytes simply by dividing by 128. Last but not least, you might want to do a spell check before you submit your post.
For example:
SELECT [DB_Name] = CASE WHEN database_ID = 32767 THEN 'ResourceDB' ELSE DB_NAME(database_id) END
,MB_Used = COUNT(*)/128.0
FROM sys.dm_os_buffer_descriptors
GROUP BY database_id
ORDER BY MB_Used DESC
;
--Jeff Moden
Change is inevitable... Change for the better is not.