SELECT [:fields:] 
FROM 
	day_month as dd LEFT JOIN v_awbstat_congruity AS qt 
		ON dd.Val = qt.WeekDayIns AND 
			DateInsNoTime >= DATE_ADD(@date, INTERVAL -WEEKDAY(@date) DAY) AND DateInsNoTime <= DATE_ADD(@date, INTERVAL 6 - WEEKDAY(@date) DAY)
			LEFT JOIN vettori AS v ON qt.vettore_id = v.id
WHERE dd.Val >= 1 AND dd.Val <= 7
 [:param:] GROUP BY 
[:groupby:]
ORDER BY dd.Val