CREATE VIEW monitor__references_used_in_valsize AS
SELECT r.id,r.`reference`, count(v.reference) AS `val_size`
FROM val__size AS v
RIGHT JOIN def__reference AS r USING(reference)
GROUP BY r.`reference`  
ORDER BY `r`.`id` ASC