,D.[Score] B_Score ,'Distince'= CASE WHEN C.Score > D.Score THEN C.[Score] - D.[Score] WHEN C.Score < D.Score THEN D.[Score] - C.[Score] END FROM [tbiz_AssScoreAction] C INNER JOIN [tbiz_AssScoreAction] D ) = D.RelationID --等价语法 ,D.[Score] - C.Score…
对多关联查询,查询多中的记录,但是返回一的结果集 子查询语法 --一对多关联查询,查询多中的记录,但是返回一的结果集 SELECT C.* FROM ( SELECT A.BasicID FROM [tbiz_PuzzleBasic] A LEFT JOIN [tbiz_PuzzleWork] B ON B.BasicID = A.BasicID WHERE B.Position LIKE '%经理%' GROUP BY A.BasicID ) T LEFT JOIN [tbiz_PuzzleB…
CASE ,D.[Score] B_Score ,'Distince'= CASE WHEN C.Score > D.Score THEN C.[Score] - D.[Score] WHEN C.Score < D.Score THEN D.[Score] - C.[Score] END FROM [tbiz_AssScoreAction] C INNER JOIN [tbiz_AssScoreAction] D ) = D.RelationID --等价语法 ,D.[Score] - C.…