You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND races_tb.nascar_fin > 0 AND (races_tb.drv_id = driver_tb.drv_id) AND (tr' at line 1