Multi-Hop Worked Examples
This example uses the School Data from the Learning Centre, containing tables for Students, Attendees, Courses, Teachers, Departments and Classrooms.
ERD Setup
Accessing Attributes
- On a View on the Courses table, you can access the Department name and Student name
Aggregating on Attributes
Example: Quantity of Males vs Females on Each Course
We want to see the number of males and females on each course.
- On the Course table, create a new View
- Name:
CourseByGender
- Save the View
- Name:
- In the View Attributes section, click the icon
- In the Available Attributes window:
- From the Course table, drag across the CourseID and Name attributes into the View Attributes section of the View
- Under Related Tables, select the Attendees table - this allows access to the Attendee's related tables
- Under Related Tables, select the Students table
- Drag across the Gender attribute twice into the View Attributes section of the View
- Double click on one of the Schools_StudentsGender attributes
- On the View Attributes properties:
- Name:
Males
- Aggregate Function: choose
Count
- Filter: create a new filter
- Name:
ByMales
- Filter Details:
Gender
containsMale
- Name:
- Name:
- On the View Attributes properties:
- Repeat these steps for the other Schools_StudentsGender attribute but this time for Females
- Display the data in the View by hovering over More Options and clicking Display