เปอร์เซ็นต์ของคำถามที่ยอมรับและตอบต่อคำถามทั้งหมด สิ่งนี้เขียนขึ้นด้วยความพยายามที่จะจัดทำสถิติสำหรับhttp//www.reddit.com/r/Wordpress/comments/ljlsy/what_do_you_guys_think_of/ ฉันไม่แน่ใจ 100% สิ่งนี้ถูกต้อง แต่ฉันค่อนข้างแน่ใจว่ามันใกล้เคียง . จะดีมากถ้ามีคนที่รู้สคีมาดีกว่าสามารถตรวจสอบได้ ไม่จำเป็นต้องใช้ตารางทั้งหมด
Percent of Questions Accepted and Answered to Total Questions. This was written in an attempt to provide stats for this
http//www.reddit.com/r/Wordpress/comments/ljlsy/what_do_you_guys_think_of/
I'm not 100% sure this is correct, but I'm pretty sure it is close.
Would love it if someone who knows the schema better can review it.It is not neccessary to use all the tables.
 PostNoticeTypes:  Id [ number]  ClassId [ number]  Name [ text]  Body [ text]  IsHidden [ boolean]  Predefined [ boolean]  PostNoticeDurationId [ number] 
SELECT Questions, Accepted, Answered, CAST(Questions - Answered AS INT) AS Unanswered, CAST(CAST(Accepted / Questions * 100 AS FLOAT(5, 1)) AS TEXT(5)) + '%' AS PercentAccepted, CAST(CAST(Answered / Questions * 100 AS FLOAT(5, 1)) AS TEXT(5)) + '%' AS PercentAnswered FROM (SELECT COUNT(*) * 1.0 AS Questions, SUM(CASE WHEN AcceptedAnswerId IS NULL THEN 0 ELSE 1 END) * 1.0 AS Accepted, SUM(CASE WHEN COALESCE(AnswerCount, 0) = 0 THEN 0 ELSE 1 END) * 1.0 AS Answered FROM Posts WHERE 1 = 1 AND PostTypeId = 1 AND ClosedDate IS NULL AND CommunityOwnedDate IS NULL) AS x