SELECT foo_idFROM example_a__dataWHERE foo_id IN (SELECT bar_id FROM example_a__rollup);
Or write it the idiomatic way (i.e., as a proper semi-join):
SELECT foo_id
FROM example_a__data
WHERE EXISTS (SELECT 1
FROM example_a__rollup
WHERE example_a__rollup.bar_id = example_a__data.foo_id)
IME its harder to forget the table prefix when using this form.
David J.