wylliecoyote
Technical User
I need a query that will select only those student IDs with an average amount_paid less than 650. So far I have this written out and it works for returning the data with the criteria given. What would I add to only select where the student_id is less than 650? I have been working on this for hours and can not figure it out.
Thanks.
Thanks.
Code:
select student_id as "StudentId", sum(amount_paid) as "Total_Paid",
min(regstrn_made_date) as "Earliest_Reg_Date",
count(*) as "Number_of_courses", avg(amount_paid) as "Average_Paid" from attendance
where offering_id in ('9111','9112','9212')
group by student_id
order by "Total_Paid" desc;