Вы хотите простую условную агрегацию:
Select count(distinct case when expiredate >= GetDate() then accountid end) as x,
count(distinct case when expiredate <= GetDate() then accountid end) as y
from table1
where active = 1 and acceptedon is not null;