Return records from one table based on a count in another table

I am looking to return records to a RG, only if there are records in another table that have a field match in another table.

The idea is Table 1 has a list of Depts. Table 2 has a list of Employee Names and their assigned Depts. I’d like to return a RG list of only Depts that have at least 1 Employee in Table 2, as we have many more Depts than are staffed (which changes all the time).

Any help trying to understand how to populate Table 1 with just those records? Thanks for any help!

1 Like

Hi, :wave:t2:

You can use “Group by”:

I created an example for you in a test app for you: (click the link below :point_down:t2: )

Hope it was what you’re looking for,

Juan

Hi Juan,
Yes, I noticed Group by after posting this, but you confirmed I was on the right track You are right, that was what was needed. Thanks for the quick reply and example. Greatly appreciated for the help!

1 Like

You’re welcome :+1:t2:

This topic was automatically closed after 70 days. New replies are no longer allowed.