Skip to content
Advertisement

How to return only one row per course

I am trying to return a list of course IDs that contain three components: assignments, discussions, and a syllabus. I want my results to have only one row per course ID with either Y’s or N’s indicating whether those courses have assignments, discussions, and a syllabus. However, I am getting every unique combination of Y’s and N’s for a given course ID.

How do I return only one row per course ID?

Here are my current results:

results

Advertisement

Answer

I think that you can do conditional aggregation. Starting from your existing query, that would look like:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement