for simplisty i have 2 tabels orders and customers. linked by field custid.
order table columns: orderid, custid, orderdate, orderyear, ordernum
customers table columns: custid, create_date, name
the needed oupput is
|orderyear||count orders||count customers|
with no order
the problem is the last column.
It count all customers created until the orderyear but doesnt have any order in this year.