我可以按另一个表中的记录数对SQL查询结果进行排序吗?

Something like this:

SELECT count(Answers.ID) as answertotal, Questions.* 
FROM Questions 
LEFT JOIN Answers ON Answers.qid=Questions.ID 
ORDER BY answertotal

I'm using SQLite, but any examples should help.

In MySQL, this would work:

SELECT count(Answers.ID) as answertotal, Questions.* 
FROM Questions 
LEFT JOIN Answers ON Answers.qid=Questions.ID 
GROUP BY Questions.ID
ORDER BY answertotal

In SQLLite, you may need to add an extra layer like this:

SELECT q.*, tots.answertotal
FROM Questions q
INNER JOIN ( 
  SELECT count(Answers.ID) as answertotal, Questions.ID as questionid
  FROM Questions 
  LEFT JOIN Answers ON Answers.qid=Questions.ID 
  GROUP BY Questions.ID
) tots ON tots.questionid = q.ID
ORDER BY tots.answertotal