the table has the form enter image description here I'm writing a request

SELECT COUNTER_DATE,PEOPLE, COUNT(PEOPLE) FROM counter where WEEK(`date`, 1) = WEEK(NOW(), 1) GROUP BY COUNTER_DATE; 

The query does not work, how to fix it?

  • one
    COUNT -> SUM ? - PetSerAl

1 answer 1

Rewrote the request and it worked.

 SELECT COUNTER_DATE,PEOPLE, sum(PEOPLE) FROM ip_counter where WEEK(`COUNTER_DATE`, 1) = WEEK(NOW(), 1) GROUP BY DATE(COUNTER_DATE);