{
	"name": "query/manager/product/product_work/actual/overlapped_machine_time.json",
	"table": [
		{
			"record_type": ["actual"],
			"table": "product_work"
		}
	],
	"database": "4d",
	"parameter": {
		"end_dt": "1970-01-01",
		"load_group": "",
		"start_dt": "1970-01-01"
	},
	"field": [
		"prwo.json_data.start_date",
		"prwo.json_data.start_time",
		"prwo.json_data.end_date",
		"prwo.json_data.end_time",
		"prwo.resource_id",
		"prwo.record_id"
	],
	"info_fi": "Aikavälin tot. työvaiheet",
	"query": [
		["prwo.resource_id", "=", "load_group"],
		"and",
		["prwo.json_data.end_date", ">=", "start_dt"],
		"and",
		["prwo.json_data.start_date", "<=", "end_dt"],
		"and",
		["prwo.work_phase_type", "=", "LO"],
		"or",
		"query_open"
	],
	"set": {
		"query_open": [
				["prwo.resource_id", "=", "load_group"],
				"and",
				["prwo.work_phase_type", "=", "AL"],
				"and",
				["prwo.json_data.start_date", "<=", "end_dt"]
			]
	}
}