Sure, here is a quick example:
sub_query = """
SELECT id FROM nsc_dr2.object
WHERE class_star > 0.9
AND ndet > 10
LIMIT 10000
"""
query = f"""
SELECT m.objectid, m.ra, m.dec, m.exposure, m.mjd, m.mag_auto, m.magerr_auto, m.filter, o.class_star
FROM nsc_dr2.meas AS m, nsc_dr2.object AS o
WHERE m.objectid IN ({sub_query}) AND m.objectid=o.id
"""
This takes about 12 seconds to run synchronously, but takes a very long time, perhaps forever (I've not sat around waiting long enough to find out), to load the results upon completion of the asynchronous query. Eventually I would like to increase the LIMIT to something like 10^7, or even remove it altogether, but I cannot run such a query synchronously and I can't load the results for 10^4 objects asynchronously.