Having the query create a data table is really not an inhibitor. The script below is a simple modification of the previous script, with the addition of moving the contents of the Name column from the final data table, into a list and then deleting the data table. As far as anyone running the script, no data tables are ever displayed.
Names Default To Here( 1 );
dt = Open( "$Sample_Data/Big Class.jmp", invisible );
AgeList = {12, 13, 15};
_xx = Words( Char( AgeList ), "{}" )[1]; //convert to a comma delimited text and remove braces {}
ndtQ = Query( Table( dt, "t1" ),invisible, Eval Insert( "SELECT DISTINCT name From t1 WHERE age IN (^_xx^)" ) );
namesList = ndtQ:Name << get values;
Close( dt, NoSave );
close(ndtQ, nosave);
Jim