Appendix B. Querying-All-Occurrences-Interactions

There are many ways to query for all-occurrences interactions. This appendix utilizes the PostgreSQL EXISTS() function, which is useful when the result of the query does not need any columns from the SAMPLES table. A regular join would work as well.

Example B.1. Finding all the all-occurrences interactions

  FROM actor_actees
                 FROM samples
                 WHERE samples.sid = actor_actees.sid
                       AND (samples.sname =
                            OR samples.sname = actor_actees.actee);

Page generated: 2023-11-28T17:36:11-05:00.