antoncrowley
Programmer
i want to create a query like the following off of the mas 90 data.
sorry i don't have the table descriptions in front of me so i made the table names up.
the query should be pretty self explanatory, i am pulling the order totals by month for a year with the company that ordered them.
this will be my first query off of mas 90 data so sorry for any incorrect syntax, i know the following would work on a sql server box.
select
c.company_name,
datepart(mm,o.create_dt) [month],
count(*) [number_of_orders],
sum(o.order_amount) [sum_of_orders]
from order o
left join company c
on c.id = o.company_id
and o.create_dt between '1/1/2006' and '1/1/2007'
group by
c.company_name,
datepart(mm,o.create_dt)
can someone help me translate this into a mas 90 query with the correct tablenames and sql syntax for mas 90?
thanks in advance
sorry i don't have the table descriptions in front of me so i made the table names up.
the query should be pretty self explanatory, i am pulling the order totals by month for a year with the company that ordered them.
this will be my first query off of mas 90 data so sorry for any incorrect syntax, i know the following would work on a sql server box.
select
c.company_name,
datepart(mm,o.create_dt) [month],
count(*) [number_of_orders],
sum(o.order_amount) [sum_of_orders]
from order o
left join company c
on c.id = o.company_id
and o.create_dt between '1/1/2006' and '1/1/2007'
group by
c.company_name,
datepart(mm,o.create_dt)
can someone help me translate this into a mas 90 query with the correct tablenames and sql syntax for mas 90?
thanks in advance