{
  "name": "query/custom/fastems/machine_data_last_running_event.json",
  "parameter": {
    "load_group": "",
		"machine_state": ["A0000", "CUTTING"],
    "start_date":""
  },
  "query": [
    [
      "nmd_load_group_id",
      "=",
      "load_group"
    ],
    "and",
    [
      "nmd_machine_state",
      "in",
      "machine_state"
    ],
    "and",
    "date_set"
  ],
  "set":{
    "date_set":[
      [
        "nmd_end_date",
        ">=",
        "start_date"
      ],
      "or",
      [
       "nmd_end_date",
       "=",
       "0000-00-00"
      ]
    ]
  },
  "order": ["nmd_code_id", ">"],
  "field": [
    "nmd_code_id",
    "nmd_start_date",
    "nmd_start_time",
    "nmd_end_date",
    "nmd_end_time"
  ]
}
