Home > database >  The couple asked two questions under the great god answer thank you for the emergency
The couple asked two questions under the great god answer thank you for the emergency

Time:10-03

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:

refer to the second floor bo871747022 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
  • Related