I’ve got two tables using the following simple structure:
-----------
id | count|
-----------
One table for men and another for females. I’d like to compare the rows of the two tables and select the ones that have the highest count. For example:
If one row has a count of 500, and the other row has a count of 200, it should select the first row, and add it to a new table along with the results of the rest of the rows.
This assumes that table_a and table_b have identical id’s: