SELECT nb.*, na.pen_name AS author_name, COUNT(DISTINCT nc.id) AS chapterCount, SUM(nc.word_count) AS totalWords, MAX(nc.create_time) AS lastUpdateTime FROM novel_books nb LEFT JOIN novel_author na ON nb.author_id = na.id LEFT JOIN novel_chapter nc ON nb.id = nc.book_id;

SELECT nb napen_name as author_name countdistinct ncid as chapterCount sumncword_count as totalWords MAXnccreate_time as lastUpdateTime FROM novel_books nb LEFT JOIN novel_author na ON n

原文地址: https://www.cveoy.top/t/topic/dtDr 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录