CourseInsights / test / resources / queries / valid / groupBy3MaxMinAvgCount.json
groupBy3MaxMinAvgCount.json
Raw
{
	"title": "GroupBy3MaxMinAvgCount",
	"input": {
		"WHERE": {
			"GT": {
				"rooms_seats": 300
			}
		},
		"OPTIONS": {
			"COLUMNS": [
				"Seats",
				"fullname",
				"rooms_number",
				"Lat",
				"Lon",
				"rooms_name",
				"rooms_address"
			],
			"ORDER": {
				"dir": "DOWN",
				"keys": [
					"Seats"
				]
			}
		},
		"TRANSFORMATIONS": {
			"GROUP": [
				"rooms_number",
				"rooms_name",
				"rooms_address"
			],
			"APPLY": [
				{
					"Seats": {
						"MAX": "rooms_seats"
					}
				},
				{
					"Lon": {
						"AVG": "rooms_lon"
					}
				},
				{
					"Lat": {
						"MIN": "rooms_lat"
					}
				},
				{
					"fullname": {
						"COUNT": "rooms_fullname"
					}
				}
			]
		}
	},
	"errorExpected": false,
	"orderExpected": true,
	"orderBy": "Seats",
	"expected": [
		{
			"Seats": 503,
			"fullname": 1,
			"rooms_number": "2",
			"Lat": 49.26478,
			"Lon": -123.25,
			"rooms_name": "WOOD_2",
			"rooms_address": "2194 Health Sciences Mall"
		},
		{
			"Seats": 442,
			"fullname": 1,
			"rooms_number": "A",
			"Lat": 49.26047,
			"Lon": -123.24,
			"rooms_name": "OSBO_A",
			"rooms_address": "6108 Thunderbird Boulevard"
		},
		{
			"Seats": 426,
			"fullname": 1,
			"rooms_number": "1250",
			"Lat": 49.26207,
			"Lon": -123.25,
			"rooms_name": "CIRS_1250",
			"rooms_address": "2260 West Mall, V6T 1Z4"
		},
		{
			"Seats": 375,
			"fullname": 1,
			"rooms_number": "100",
			"Lat": 49.2661,
			"Lon": -123.25,
			"rooms_name": "HEBB_100",
			"rooms_address": "2045 East Mall"
		},
		{
			"Seats": 350,
			"fullname": 1,
			"rooms_number": "1013",
			"Lat": 49.26274,
			"Lon": -123.25,
			"rooms_name": "ESB_1013",
			"rooms_address": "2207 Main Mall"
		},
		{
			"Seats": 350,
			"fullname": 1,
			"rooms_number": "1001",
			"Lat": 49.26236,
			"Lon": -123.24,
			"rooms_name": "LSC_1001",
			"rooms_address": "2350 Health Sciences Mall"
		},
		{
			"Seats": 350,
			"fullname": 1,
			"rooms_number": "1002",
			"Lat": 49.26236,
			"Lon": -123.24,
			"rooms_name": "LSC_1002",
			"rooms_address": "2350 Health Sciences Mall"
		},
		{
			"Seats": 325,
			"fullname": 1,
			"rooms_number": "100",
			"Lat": 49.26517,
			"Lon": -123.25,
			"rooms_name": "WESB_100",
			"rooms_address": "6174 University Boulevard"
		}
	]
}