TITLE;แสดงยอดขายสินค้า
SQL;drop table if exists _gr1&
SQL;create table _gr1
SQL;select left(invcard.id,10) as id, sum(salepuramt) as saleamt
SQL;from invcard
SQL;where (left(docno,2) = 'IV' or left(docno,2) = 'RI')
SQL;and datedoc >= :m11 and datedoc <= :m12
SQL;group by 1
SQL;order by saleamt desc
SQL;limit 15&
SQL;
SQL;select * from _gr1
CONDITION;ตั้งแต่วันที่~INVCARD.DATEDOC~Date~2~~
SERIES;1~id~saleamt~ยอดขาย
