Avatar of Sourceminer
Sourceminer
Flag for United States of America asked on

MySQL DateAdd Function

I know MSSQL but seems that mySQL is not liking some syntax I need help with the Date Add Function here is the query below what am I doing wrong with the the DateADD fucntion in this syntax?


SELECT
agentactivity.AgentFirstName,
agentactivity.AgentLastName,
Count(call.WorkgroupCall) AS TotalCalls,
agentactivity.WorkgroupName,
call.DialedNumber
FROM
`agentactivity`
Inner Join `queuecall` ON agentactivity.QueueCallID = queuecall.ID
Inner Join `connect` ON queuecall.ConnectTableID = connect.ID
Inner Join `call` ON call.ID = connect.CallTableID
Inner Join `calltype` ON call.CallType = calltype.CallType
WHERE
call.StartTime <  DATE_ADD(day, -10, NOW())
GROUP BY
agentactivity.AgentFirstName,
agentactivity.AgentLastName
ORDER BY
TotalCalls DESC

Open in new window

MySQL Server

Avatar of undefined
Last Comment
Sourceminer

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Roger Baklund

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Sourceminer

ASKER
Sweet, I looked at the online document prior to my asking the question, seems I was just missing the "Interval" key word, good to know about the shortcut.
Thank you for the Fast Reply!
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck