# views

name: orders-customer
headings_array:
  ---
  - date
  - quantity
  - model

created_at: 2012-08-26 20:56:49
updated_at: 2012-08-28 07:01:28
query_array:
  --- 
  - o.date, l.quantity, s.model
  - companies c, orders o, line_items l, systems s
  - c.name = 'companyB' and c.id = o.company_id and o.id = l.order_id and l.id = s.line_item_id
  - o.date


name: orders-w-disk
created_at: 2012-08-26 20:56:49
updated_at: 2012-08-26 20:56:49
query_array:
  --- 
  - c.name, o.date, l.quantity, s.model, d.model
  - companies c, orders o, line_items l, systems s, disks d
  - o.id = l.order_id and l.id = s.line_item_id and s.id = d.system_id and d.manufacturer = 'foo'
  - c.name, o.date


name: value-period
headings_array:
  ---
  - total( o.total )

created_at: 2012-08-26 20:56:49
updated_at: 2012-08-28 07:01:53
query_array:
  --- 
  - total( o.total )
  - companies c, orders o
  - c.name = 'companyB' and o.company_id = c.id and o.date between date( '2012-01-01' ) and date( '2012-10-01' )
  - ""


