将其包装在另一个查询中有窍门吗?
SELECt RequiredId, <all_the_other_fields> from (SELECt t2.SomeId AS RequiredId-- ...other data mainly from t2FROM DataTable1 AS t1 LEFT JOIN DataTable2 AS t2 ON t2.OtherId = t1.ExperienceId AND t2.LanguageId = (SELECt TOP 1 t1.LanguageId ORDER BY t1.LanguageId) ) group by RequiredId, <all_the_other_fields>
甚至根本不提取列?
SELECT distinct t2.SomeId AS RequiredId-- ...other data mainly from t2 BUT not the Language idFROM DataTable1 AS t1 LEFT JOIN DataTable2 AS t2 ON t2.OtherId = t1.ExperienceId AND t2.LanguageId = (SELECT TOP 1 t1.LanguageId ORDER BY t1.LanguageId)



