I believe that if you run your interactive database query, then once the new table is created, you can look in the Table Panel on the left side of the data table for the "Source" entry. Right click on Source and select Edit and you will see the JSL required to perform the extraction using JSL
Jim