Task: Text to Code
Input (English): What are the total purchases for members rated at level 6?
Output (English): SELECT count(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id  =  T2.member_id WHERE T2.level  =  6