<commit_before>input
=====

{
	"order":{
			"columns":	[
					"OrderDate",
					"IdOrder",
					"ShipName",
					"customer":{
						"columns":[
							"CompanyName",
							"ContactName",
							"ContactName"
						],
						"from": "Customer AS a",
						"where": "a.IdCustomer=b.IdCustomer",
						"arity": "1"
					},
					"lines":{
						"columns":[
							"UnitPrice",
							"Quantity",
							"product":{
								"columns":[
									"ProductName",
									"QuantityPerUnit"
								],
								"from": "Product as d"
								"where": "d.IdProduct = c.IdProduct"
								"arity":"1"
							}
						],
						"from": "OrderDetail AS c",
						"where": "c.IdOrder=b.IdOrder",
						"arity": "n"
					}
				],
			"from": "Order as b",
			"where": "IdOrder=10248"
			"arity": "1"
	}
}


generated SQL query
===================
SELECT '{' ||
(
  SELECT '"order":{"OrderDate":"'||"OrderDate" || '","IdOrder":"' || "IdOrder" || '","ShipName":"' || "ShipName" || '"}' || ',"customer":' ||
  (
    SELECT '{ "CompanyName":"' || CompanyName || '","ContactName":"' || ContactName || '"}' FROM Customer AS a WHERE a.IdCustomer=b.IdCustomer
  ) || (
    SELECT ',"lines":[' || GROUP_CONCAT("record",',') ||']' FROM(
          SELECT '{"UnitPrice":'||UnitPrice || ',"Quantity":' || Quantity||',"product":{' || (
               SELECT '"ProductName":"' || "ProductName" || '"' || ',"QuantityPerUnit":"' || "QuantityPerUnit" || '"'
               FROM Product as d WHERE d.IdProduct = c.IdProduct
          )||'}}' AS record
          FROM OrderDetail AS c WHERE c.IdOrder=b.IdOrder
    )
  )
) || '}'AS invoice
FROM "Order" AS b
WHERE IdOrder=10248


output<commit_msg>correction to data model spec<commit_after>input
=====
{
	"order":{
			"columns":	[
					"OrderDate",
					"IdOrder",
					"ShipName",
					{"customer":{
						"columns":[
							"CompanyName",
							"ContactName",
							"ContactName"
						],
						"from": "Customer AS a",
						"where": "a.IdCustomer=b.IdCustomer",
						"arity": "1"
					}},
					{"lines":{
						"columns":[
							"UnitPrice",
							"Quantity",
							{"product":{
								"columns":[
									"ProductName",
									"QuantityPerUnit"
								],
								"from": "Product as d",
								"where": "d.IdProduct = c.IdProduct",
								"arity":"1"
							}}
						],
						"from": "OrderDetail AS c",
						"where": "c.IdOrder=b.IdOrder",
						"arity": "n"
					}}
				],
			"from": "Order as b",
			"where": "IdOrder=10248",
			"arity": "1"
	}
}


generated SQL query
===================
SELECT '{' ||
(
  SELECT '"order":{"OrderDate":"'||"OrderDate" || '","IdOrder":"' || "IdOrder" || '","ShipName":"' || "ShipName" || '"}' || ',"customer":' ||
  (
    SELECT '{ "CompanyName":"' || CompanyName || '","ContactName":"' || ContactName || '"}' FROM Customer AS a WHERE a.IdCustomer=b.IdCustomer
  ) || (
    SELECT ',"lines":[' || GROUP_CONCAT("record",',') ||']' FROM(
          SELECT '{"UnitPrice":'||UnitPrice || ',"Quantity":' || Quantity||',"product":{' || (
               SELECT '"ProductName":"' || "ProductName" || '"' || ',"QuantityPerUnit":"' || "QuantityPerUnit" || '"'
               FROM Product as d WHERE d.IdProduct = c.IdProduct
          )||'}}' AS record
          FROM OrderDetail AS c WHERE c.IdOrder=b.IdOrder
    )
  )
) || '}'AS invoice
FROM "Order" AS b
WHERE IdOrder=10248


output
{'fraction_non_alphanumeric': 0.2336923997606224, 'fraction_numerical': 0.007779772591262717, 'mean_word_length': 2.4678423236514524, 'pattern_counts': {'":': 66, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3458556', 'n_tokens_mistral': 1517, 'n_tokens_neox': 1094, 'n_words': 223}