question type for moodle, SQL queries