What I'm looking for is a way to "select a teacher and count the number of associated classes for this teacher" at a moment in time. My questions are:
1. How would I define/create the two tables using temporal tables?
2. What would such a select statement look like?
3. What indexes should be created in order to make the select statement efficient?
Note that it's very important that the query is expressed using application time and not system time.
BR,
/Johan