CodePudding user response:
DELETE FROM 1 (TA LEFT JOIN TB ON ta.621 IDKEY=TB. IDKEY) T WHERE T.T YPE='type a'2 the select guest, sum (jc), count (*) from the CUSTOMER group by guest
CodePudding user response:
DELETE FROM TB WHERE DKey IN (SELECT DKey FROM TA WHERE ta.621 TYPE='TYPE a')
SELECT * FROM (SELECT guest, COUNT (je) c, SUM (je) s FROM TC GROUP BY guest) where c> The ORDER BY 2 s ASC
CodePudding user response: