I have a registration table with several columns that contain values like "in progress" or "submitted". I'm trying to count how many of these columns are equal to "submitted", so I can determine a percent completion for the user. The query below obviously only returns 0 or 1, because it's querying only one column, but how can I incorporate the others?
For example, I want to count how many of the following columns are equal to "submitted" or "accepted":
network_user_status
work_ed_status
chores_status
class_schedule_status
SELECT COUNT(id) FROM registration WHERE username = "ajackson" AND enrollment_agreement_status = "accepted" OR enrollment_agreement_status = "submitted"