Look up the JMP function Query()
Query(<<dt1|Table(dt1, alias1)>, ..., <dtN, aliasN)>>, <private | invisible>, <scalar>, sqlStatement )
Description
Performs a SQL query on selected data tables.
Of course, you can use JMP Query Builder in a ascript. When you ran the JMP Query Builder script and it ran, the resulting table should have a Run Query script attached. This is the JSL script to run the same query.
Hope that helps.