Query existing dataset

Can someone push me in the direction I should be looking to do this.

I have a screen with 2 tables on it. One doing a general query of data in database table. The second is doing a sum of like products.
Which creates two hits to database.

Is there a way to use the dataset from table 1 in query for table 2 so there is only one hit to database, kind of like:

FROM {Root Container.Table 1.data}
Group By

You cannot do an SQL query against the table dataset - but you can search it using the lookup function:http://www.inductiveautomation.com/support/usermanuals/ignition/index.html?gen_logic_lookup.htm

Ok, Thanks