Atwp67
Atwp67

Reputation: 307

Data validation on curdate() group by error code 1111

This is relatively easy but I've been staring at the code too long and making mistakes. I need to validate that a table has been populated for the day and the query simply takes today's date - curdate() - against the date_pulled column but I'm getting Error Code: 1111. Invalid use of group function. Where am I messing up.

 select * from test where max(date(date_pulled))=curdate();

Upvotes: 0

Views: 30

Answers (1)

echo_Me
echo_Me

Reputation: 37253

you dont need max here. you already telling the query to choose the date which is equal to current date.

try that:

  select * from test where date(date_pulled)=curdate();

Upvotes: 1

Related Questions