Crossmatches of large catalogs with other large catalogs are necessarily computationally fairly expensive. Also, providers may want to be smart about the crossmatches, taking into account additional information (proper motions, magnitudes, etc.; a Bayesian test is actually a good model for what’s really going on when properly crossmatching).
For considerations like these, ESA on their TAP service provide pre-computed crossmatches between a few catalogs (“* best_neighbour").
Find their service with"Select Service", Keywords esa gaia.
The crossmatch tables essentially correlate ids ("primary keys"in relational jargon) from the two tables. See for yourself:
select top 30 * from tmass_best_neighbour
To use them, do a three-way join – first, add the"right"id using a join with the"left", and then join on that. A catalog with tgas astrometry and 2MASS photometry:
SELECT TOP 200 tgas.ra, tgas.dec, pmra, pmdec, j_m, h_m, ks_m FROM tmass_original_valid AS tmov JOIN tmass_best_neighbour USING (tmass_oid) JOIN tgas_source AS tgas USING (source_id)"
Using the pattern just discussed, make a catalog of proper motions and 2MASS photometry for TGAS objects with a G magnitude between 8 and 8.5. Make a few plots correlating proper motions and photometric quantities (perhaps: A colour-magnitude diagram with color-coded absolute proper motions). Can you see something?