Sales by Months and Years

1. Sales by Month

select c.company, extract(month from saledate) field, sum(itemstotal) "VALUE" from customer c join orders o on o.custno=c.custno group by 1,2 order by 1

2. Sales by Year

select c.company, extract(year from saledate) field, sum(itemstotal) "VALUE" from customer c join orders o on o.custno=c.custno group by 1,2 order by 1