Output 2.38 Using the COUNT FUnction to Count All Rows in a Table
-------------------------------------------------------------------*/
proc sql;
title 'Number of Countries in the SQL.COUNTRIES Table';
select count(*) as Number
from sql.countries;
/*-------------------------------------------------------------------
Output 2.39 Finding Errors Caused by Missing Values (Unexpected Output)
-------------------------------------------------------------------*/
/* unexpected output */
proc sql;
title 'Average Length of Angel Falls, Amazon and Nile Rivers';
select Name, Length, avg(Length) as AvgLength
from sql.features
where Name in ('Angel Falls', 'Amazon', 'Nile');
/*-------------------------------------------------------------------
Output 2.40 Finding ...