I have query that counts the number of distinct values of a given field for a given week that where not recorder before. It counts the number of new values for the week.
(creation BETWEEN CURDATE() - INTERVAL DAYOFWEEK(CURDATE()) + 5 DAY AND CURDATE() - INTERVAL DAYOFWEEK(CURDATE()) - 2 DAY)
AND field NOT IN (SELECT DISTINCT
creation < CURDATE() - INTERVAL DAYOFWEEK(CURDATE()) + 5 DAY);
Well, if I understand this correctly, a field occurs in some week for the first time. You want to count per week how many such first occurrences exist. So get the first date per field first. Then count per week.
select yearweek(first_occurence), count(*) from ( select field, min(creation) as first_occurence from table group by field ) fields group by yearweek(first_occurence) order by yearweek(first_occurence);