0
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
4

1 に答える 1

0
SELECT DISTINCT(Quiz.id), SUM(ticketfee * enrolledplayers)
FROM Quiz
JOIN Enrollment on Quiz.id = Enrollment.Quiz_id
WHERE (Quiz.state=3 OR Quiz.state=4) AND Enrollment.promocoupon_id IS NULL
于 2013-02-25T11:03:06.223 に答える