你可以用 DISTINCT 关键字输入并选择以获取唯一的结果集。
DISTINCT
SELECT DISTINCT t1.horseid,t1.raceid....<col name> FROM <table>