CodePudding user response:
SELECT IDH, JE, XKS, SJ
The FROM DZ D1
The WHERE (... Judge condition)
AND the EXISTS (SELECT NEWIDH
The FROM DZ D2
The WHERE (... Judge condition)
AND D1. IDH=D2. NEWIDH);
CodePudding user response:
SELECT IDH, JE, XKS, SJ
The FROM DZ D1
The WHERE (... Judge condition)
AND the EXISTS (SELECT 1
The FROM DZ D2
The WHERE (... Judge condition)
AND D1. IDH=D2. NEWIDH);
CodePudding user response:
And how is line with idh, sj to columns, two fields of XKS under the idh and je to countGiven the sample data and the desired results