I assume you are using the query interface on our Data Explorer page? If so, that interface uses ADQL, and mydb:// tables cannot be aliased in ADQL (the "FROM mydb://desi_highz AS a" part of your query). Instead, I would recommend using our Jupyter notebook server and submitting the query in SQL like:
from dl import queryClient as qc
q = """
SELECT a.*, b.flux_r, b.flux_ivar_r, b.flux_z, b.flux_ivar_z
FROM mydb://desi_highz AS a, desi_dr1.photometry AS b
WHERE q3c_join(a.ra, a.declination, b.ra, b.dec, 1./3600.)
"""
res = qc.query(sql=q, out='mydb://desi_highz_results')
Or if you want to download the table as a .csv file:
res = qc.query(sql=q, out='./desi_highz_results.csv')