SAS: Proc SQL Conditional Sum

Var1 and Con1 are numeric variables in Table1.

1) Sum of Var1 with no condition

proc sql;
select sum(var1) as sum from table1;
quit;

2) Sum of Var1 with condition on Con1

proc sql;
select sum(case when con1 = 0 then var1 else 0 end) as sum
from table1;
quit;