Correct answer

Report a typo

Remember tables from "Coding time"? Look at the code below:

SELECT
    coalesce(f.name, 'All faculties') as faculty,
    coalesce(sb.name, 'All subjects') as subject,
    AVG(m.mark) as mark
FROM mark m
INNER JOIN students s on s.id=m.student_id
INNER JOIN faculty_name f on f.id=s.faculty_id
INNER JOIN subject_type sb on sb.id=m.subject_id
GROUP BY /*Insert operator here/* (f.name,sb.name)


Which operator should we use, so the result set would look like this?

The result set of query

Select one option from the list

Create a free account to access the full topic