skip to Main Content

Delete duplicated rows if previous date has the same value – Mysql

I have the following table structure: +----------+------------+------+---------------------+---------------------+ | id | username | elo | created_at | updated_at | +----------+------------+------+---------------------+---------------------+ | 58433707 | HEADCRACK- | 1408 | 2023-03-22 00:30:07 | 2023-03-22 00:30:07 | | 58492411 | HEADCRACK- | 1408 | 2023-03-23…

VIEW QUESTION

What does count(*)=1 do? – Mysql

SELECT AL1.ACCOUNTING_PERIOD, AL1.BUSINESS_AREA, AL1.SAP_ACCOUNT, AL1.ID, AL1.USD_AMT, AL1.BAN_NBR, AL2.CUST_NBR, AL2.CUST_NAME FROM DSL_AIM.AIM AL1, DSL_AML.AID AL2 WHERE ( ( AL1.ACCOUNTING_PERIOD_CD IN ( '2023-02' ) GROUP BY AL1.ACCOUNTING_PERIOD, AL1.BUSINESS_AREA, AL1.SAP_ACCOUNT, AL1.ID, AL1.USD_AMT, AL1.BAN_NBR, AL2.CUST_NBR, AL2.CUST_NAME HAVING COUNT(*) = 1; I get a different…

VIEW QUESTION
Back To Top
Search