Add a raw SQL version of the weekData function.