This seems to work OK. Many ways to solve it.
UPDATE
date_calendar
SET
quarter_weekdays_remaining =
(
SELECTISNULL( SUM( r.is_weekday ), 0 )
FROMdate_calendar r
WHEREr.calendar_date > s.calendar_date
ANDr.calendar_year = s.calendar_year
ANDr.calendar_quarter = s.calendar_quarter
),
quarter_weekdays_completed =
(
SELECTISNULL( SUM( c.is_weekday ), 0...