{
	"name": "form/nc/report/lead-time/query/lead-time-data-query.json",
	"data_query": [
		{
			"run": [
				["showSql", [true]]
			]
		},
		{
			"tag": "ordr",
			"query": "form/nc/report/lead-time/query/sales-lead-time-grid.json"
		},
		{
			"run": [
				["data.ordr", "=", "data.ordr.data"]
			]
		},
		{
			"run": [
				["setRecordArrConcatField", ["data.ordr", "order_with_row", ["ordr.order_id", ".", "ordr.row_number"]]]
			]
		},
		{
			"run": [
				["parameter.order_with_row", "=", ["arrayUnique", ["data.ordr", "order_with_row"]]]
			]
		},
		{
			"tag": "pro_all",
			"query": "form/nc/report/lead-time/query/lead_time_grid.json"
		},
		{
			"run": [
				["data.pro", "=", ["reduce", ["leadTimeProData", "data.pro_all.data"]]]
			]
		},
		{
			"run": [
				[
					["map", ["leadTimeOrdrData", "data.ordr", "data.pro"]]
				]
			]
		},
		{
			"run": [
				["showSql", [false]]
			]
		}
	]
}