Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Insert excerpt
_Banners
_Banners
nameERD
nopaneltrue

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

HTML Comment
hiddentrue
  • Aggregation:
    • Get the number of courses for a department name 
    • Get the number of students on a course
      • how many females and males
    • Get the number of men on the course, Maths Level 1
    • See all males and females on Maths Level 1 since 2019 intake year

Example: Quantity of Males vs Females on Each Course

We want to see the number of males and females on male and female students taking each course.

  1. On the Course table, create a new View
    1. Name: CourseByGender
    2. Save the View
  2. In the View Attributes section, click the 
    Insert excerpt
    _attributes_icon
    _attributes_icon
    nopaneltrue
    icon
  3. In the Available Attributes window:
    1. From the Course table, drag across the CourseID and Name attributes into the View Attributes section of the View
    2. Under Related Tables, select the Attendees table - this allows access to the Attendee's related tables
    3. Under Related Tables, select the Students table
    4. Drag across the Gender attribute twice into the View Attributes section of the View

    5. Double click on one of the Schools_StudentsGender attributes 
      1. On the View Attributes properties:
        1. Name: Males
        2. Aggregate Function: choose Count
        3. Filter: create a new filter
          1. Name: ByMales
          2. Filter Details: Gender contains Male
    6. Repeat these steps for the other Schools_StudentsGender attribute but this time for Females
  4. Display the data in the View by hovering over
    Insert excerpt
    _more_options
    _more_options
    nopaneltrue
    and clicking 
    Insert excerpt
    _view_show_icononly
    _view_show_icononly
    nopaneltrue
    Display
HTML Comment

Example 2: Students on Each Course

We want to see the number of males and females on each course.

Example 2: Students and Teachers in a Department

We want to see the names of teachers and students umber of males and females on each course.