SELECT board.id, board.section_id, board.name, board.dir, board.description, board.filesize, board.banner, board.threads_page, board.threads_board, board.forced_anonymous, board.comment_length, board.thread_length, section.id AS section_id, section.name AS section_name, COUNT(*) AS post_amount FROMboards AS board, sections AS section, posts AS post WHEREboard.id = 3 ANDboard.id = post.board_id ANDpost.thread_id IS NULL ANDboard.section_id = section.id GROUP BY board.section_id LIMIT 0 , 500