Reputation: 307
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
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