Have a look at this page:
http://wiki.modxcms.com/index.php/DB_query_and_Placeholders
It shows you a full SQL query, and then it gives you a way to parse the output, e.g. if itβs a SELECT statement that returns a bunch of rows that you want to iterate over.