Like @dbrace said, it depends on the type of content -- depending on what you were looking for (e.g. date of last participation in a specific course?) I think you will have to do some sort of rollup query combining something like the assignment query below with similar queries for the other activity types. You can use the GREATEST(COALESCE(...)) AS last_type_participation row statement when there's multiple possible dates being recorded (or not) for a single participation type
select course_id, workflow_state, id as "submission_id", assignment_id, submission_type, user_id
, GREATEST(
COALESCE(created_at, '1900-01-01'::timestamp),
COALESCE(posted_at, '1900-01-01'::timestamp),
COALESCE(updated_at, '1900-01-01'::timestamp),
COALESCE(submitted_at, '1900-01-01'::timestamp)
) AS last_assignment_participation
from canvas.submissions
where course_id = xxxxx
and workflow_state not in ('deleted')
and assignment_id = xxxxx
limit 20;