"select"

select statement The selection block identifies a table, selection criteria for selecting rows from that table, and a sort order for row selection. The "select" statement is very similar to Rim's "select" command except that it contains only the "from", "where", and "sort" clauses.  <"select from" <table> 〈"where" <criteria>〉 〈"sort" 〈"by"〉 <sort order>〉
    &vellip#vdots;
"end" 〈"select"〉 where
\begin{List}
% latex2html id marker 679\item[<table>] may be any table in your...
...sort'' clause
(see section~\ref{sort-clause}).
\I{sort@<sort clause>}
\end{List}

All statements within the selection block, which may include other "select" statements, will be processed for each row of <table> that passes the "where" criteria. Rows are retrieved and processed in the order specified by the "sort" clause. For example, the statements

   yesterday = report_date - 1
   select from measures where M_date = yesterday
      .
      .
      .
   end select

selects all measurements from the day before the report date.