The problem was that it was grouping only by car category, and not by track and car category, in this order
To create the new table, as well as to populate it, you have to run the SQL script export_best_laps.sql