SELECT SUM(ticketfee * enrolledplayers)
FROM Quiz
INNER JOIN Enrollment on DISTINCT(Quiz.id) AND Quiz.id=Enrollment.Quiz_id
WHERE (Quiz.state=3 OR Quiz.state=4) AND Enrollment.promocoupon_id IS NULL
user2106967
質問する
35 次