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