Please help me convert this native SQL statement into TP5 thank you!

ask God to help me translate this native SQL statement into TP5 thank you! It is Db:: ("name")-> this kind of chained operation
" select a.id, a.titlerect a. Createwriting time as answer_count from fa_question a. Isometric solvepaper count (b.qid) as answer_count from fa_question a faulty calendar where a.id=b.qid and a.is_solve=0 group by b.qid order by answer_count DESC LIMIT 6 minutes;

Feb.28,2021

Db::table(['fa_question '=>'a','think_role'=>'b'])
    ->field('a.id, a.title, a.create_time, a.is_solve, count(b.qid) as answer_count)
    ->where(' a.id=b.qid and a.is_solve=0')
    ->group('b.qid')
    ->order('answer_count desc')
    ->limit(6)
    ->select()

attach the manual. Read more about the manual https://www.kancloud.cn/manua.

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bdc027-312e1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bdc027-312e1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?