How do you deduplicate model–dataset pairs?
SELECT DISTINCT deduplicates the projected row. The same model paired with another dataset yields a separate pair.
SQLite example and interpretation
Two A/x submissions and one A/y yield two pairs. Including a distinct submission timestamp in the projection would keep otherwise identical pairs apart.
WITH t(m,d) AS (VALUES('A','x'),('A','x'),('A','y')) SELECT DISTINCT m,d FROM t ORDER BY m,d;Result [["A", "x"], ["A", "y"]]
中文
怎样按模型与数据集的组合去重?
SELECT DISTINCT 对整行选出的字段判重,同一模型搭配不同数据集仍构成两行。
SQLite 示例与适用条件
测试台重复提交两次 A/x 和一次 A/y,去重后留下两种组合。若把提交时间也投影出来,时间差会阻止合并。
WITH t(m,d) AS (VALUES('A','x'),('A','x'),('A','y')) SELECT DISTINCT m,d FROM t ORDER BY m,d;结果 [["A", "x"], ["A", "y"]]