1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
SELECT "questions_message"."id", "questions_message"."body", "questions_message"."created",
"questions_message"."author_id", "questions_message"."rating", "questions_answer"."message_ptr_id",
"questions_answer"."question_id", "auth_user"."id", "auth_user"."username",
"auth_user"."first_name", "auth_user"."last_name", "auth_user"."email",
"auth_user"."password", "auth_user"."is_staff", "auth_user"."is_active",
"auth_user"."is_superuser", "auth_user"."last_login", "auth_user"."date_joined",
"auth_user"."site", "auth_user"."email_new", T5."id",
T5."body", T5."created", T5."author_id",
T5."rating", "questions_question"."message_ptr_id", "questions_question"."title",
"questions_question"."views", "questions_question"."tags", T6."id",
T6."username", T6."first_name", T6."last_name",
T6."email", T6."password", T6."is_staff",
T6."is_active", T6."is_superuser", T6."last_login",
T6."date_joined", T6."site", T6."email_new"
FROM "questions_answer"
INNER JOIN "questions_message" ON ("questions_answer"."message_ptr_id" = "questions_message"."id")
INNER JOIN "auth_user" ON ("questions_message"."author_id" = "auth_user"."id")
INNER JOIN "questions_question" ON ("questions_answer"."question_id" = "questions_question"."message_ptr_id")
INNER JOIN "questions_message" T5 ON ("questions_question"."message_ptr_id" = T5."id")
INNER JOIN "auth_user" T6 ON (T5."author_id" = T6."id")
ORDER BY "questions_answer"."message_ptr_id"
DESC LIMIT 20