├── .gitignore ├── LICENSE ├── LICENSE.txt ├── README.md ├── __init__.py ├── config.sh ├── config_squares.sh ├── demo.sh ├── docs ├── Makefile ├── conf.py ├── index.rst ├── source │ ├── modules.rst │ ├── tyrell.decider.rst │ ├── tyrell.dsl.rst │ ├── tyrell.enumerator.rst │ ├── tyrell.interpreter.rst │ ├── tyrell.rst │ ├── tyrell.spec.rst │ └── tyrell.synthesizer.rst └── tutorial │ ├── 00_setup.rst │ ├── 01_language.rst │ ├── 02_synthesizer_basic.rst │ ├── 03_synthesizer_deduction.rst │ └── index.rst ├── example ├── deepcoder.tyrell ├── morpheus.tyrell ├── squares.tyrell └── toy.tyrell ├── jupyter-notebooks ├── demo.ipynb ├── example-vldb-1.ipynb ├── example-vldb-2.ipynb └── example-vldb-harry-potter.ipynb ├── mypy.ini ├── other-scripts ├── gen_lattices.py ├── gen_tests.py ├── generateLattices.sh ├── move-tests.py └── setup.r ├── other-versions ├── demo_deepcoder_enumerator.py ├── demo_interpreter.py ├── demo_random_enumerator.py ├── demo_smt_enumerator.py ├── generateDB.py ├── morpheus_enumerator.py ├── squares-2nd.tyrell ├── squares1st.tyrell ├── squares1st_enumerator.py ├── squares3rd.tyrell ├── sum_enumerator.py └── tests-examples-original.zip ├── setup.py ├── setup.r ├── squares.yaml ├── squaresEnumerator.py ├── test.sh ├── tests-examples ├── 55-tests │ ├── 1.in │ ├── 10.in │ ├── 11.in │ ├── 12.in │ ├── 13.in │ ├── 14.in │ ├── 15.in │ ├── 16.in │ ├── 17.in │ ├── 18.in │ ├── 19.in │ ├── 2.in │ ├── 20.in │ ├── 21.in │ ├── 22.in │ ├── 23.in │ ├── 24.in │ ├── 25.in │ ├── 26.in │ ├── 27.in │ ├── 28.in │ ├── 29.in │ ├── 3.in │ ├── 30.in │ ├── 31.in │ ├── 32.in │ ├── 33.in │ ├── 34.in │ ├── 35.in │ ├── 36.in │ ├── 37.in │ ├── 38.in │ ├── 39.in │ ├── 4.in │ ├── 40.in │ ├── 41.in │ ├── 42.in │ ├── 43.in │ ├── 44.in │ ├── 45.in │ ├── 46.in │ ├── 47.in │ ├── 48.in │ ├── 49.in │ ├── 5.in │ ├── 50.in │ ├── 51.in │ ├── 52.in │ ├── 53.in │ ├── 54.in │ ├── 55.in │ ├── 6.in │ ├── 7.in │ ├── 8.in │ ├── 9.in │ ├── small_examples │ │ ├── 1.txt │ │ ├── 2.txt │ │ ├── 3.txt │ │ ├── 4.txt │ │ ├── 5.txt │ │ ├── filter-13.txt │ │ ├── filter-select-13.txt │ │ ├── join-124.txt │ │ ├── join-13.txt │ │ ├── join-24.txt │ │ ├── n-13.txt │ │ ├── sel-join-124.txt │ │ └── select-13.txt │ └── tables │ │ ├── 1-1.txt │ │ ├── 1-2.txt │ │ ├── 1-3.txt │ │ ├── 1-4.txt │ │ ├── 1.out │ │ ├── 10-1.txt │ │ ├── 10-2.txt │ │ ├── 10.out │ │ ├── 11-1.txt │ │ ├── 11-2.txt │ │ ├── 11.out │ │ ├── 12-1.txt │ │ ├── 12.out │ │ ├── 13-1.txt │ │ ├── 13-2.txt │ │ ├── 13.out │ │ ├── 14-1.txt │ │ ├── 14-2.txt │ │ ├── 14-3.txt │ │ ├── 14.out │ │ ├── 15-1.txt │ │ ├── 15-2.txt │ │ ├── 15-3.txt │ │ ├── 15.out │ │ ├── 16-1.txt │ │ ├── 16-2.txt │ │ ├── 16-3.txt │ │ ├── 16.out │ │ ├── 17-1.txt │ │ ├── 17-2.txt │ │ ├── 17-3.txt │ │ ├── 17.out │ │ ├── 18-1.txt │ │ ├── 18-2.txt │ │ ├── 18-3.txt │ │ ├── 18.out │ │ ├── 19-1.txt │ │ ├── 19-2.txt │ │ ├── 19-3.txt │ │ ├── 19.out │ │ ├── 2-1.txt │ │ ├── 2-2.txt │ │ ├── 2-3.txt │ │ ├── 2-4.txt │ │ ├── 2.out │ │ ├── 20.out │ │ ├── 21-1.txt │ │ ├── 21-2.txt │ │ ├── 21-3.txt │ │ ├── 21.out │ │ ├── 22.out │ │ ├── 24.out │ │ ├── 25.out │ │ ├── 26.out │ │ ├── 27.out │ │ ├── 28.out │ │ ├── 3-1.txt │ │ ├── 3-2.txt │ │ ├── 3.out │ │ ├── 30.out │ │ ├── 31.out │ │ ├── 32.out │ │ ├── 33.out │ │ ├── 34.out │ │ ├── 35.out │ │ ├── 36.out │ │ ├── 37.out │ │ ├── 38.out │ │ ├── 39.out │ │ ├── 4-1.txt │ │ ├── 4-2.txt │ │ ├── 4-3.txt │ │ ├── 4.out │ │ ├── 40.out │ │ ├── 41.out │ │ ├── 42.out │ │ ├── 43.out │ │ ├── 44.out │ │ ├── 45.out │ │ ├── 46.out │ │ ├── 47.out │ │ ├── 48.out │ │ ├── 49.out │ │ ├── 5-1.txt │ │ ├── 5-2.txt │ │ ├── 5.out │ │ ├── 50.out │ │ ├── 51.out │ │ ├── 52.out │ │ ├── 53.out │ │ ├── 54.out │ │ ├── 55.out │ │ ├── 6-1.txt │ │ ├── 6-2.txt │ │ ├── 6-3.txt │ │ ├── 6.out │ │ ├── 7-1.txt │ │ ├── 7.out │ │ ├── 8-1.txt │ │ ├── 8.out │ │ ├── 9-1.txt │ │ ├── 9-2.txt │ │ ├── 9.out │ │ ├── aircraft.txt │ │ ├── certified.txt │ │ ├── employees.txt │ │ └── flights.txt ├── cp19 │ ├── 1.in │ ├── 10.in │ ├── 100.in │ ├── 101.in │ ├── 102.in │ ├── 103.in │ ├── 104.in │ ├── 105.in │ ├── 106.in │ ├── 107.in │ ├── 108.in │ ├── 109.in │ ├── 11.in │ ├── 110.in │ ├── 111.in │ ├── 112.in │ ├── 113.in │ ├── 114.in │ ├── 115.in │ ├── 116.in │ ├── 117.in │ ├── 118.in │ ├── 119.in │ ├── 12.in │ ├── 120.in │ ├── 121.in │ ├── 122.in │ ├── 123.in │ ├── 124.in │ ├── 125.in │ ├── 126.in │ ├── 127.in │ ├── 128.in │ ├── 129.in │ ├── 13.in │ ├── 130.in │ ├── 131.in │ ├── 132.in │ ├── 133.in │ ├── 134.in │ ├── 135.in │ ├── 136.in │ ├── 137.in │ ├── 138.in │ ├── 139.in │ ├── 14.in │ ├── 140.in │ ├── 141.in │ ├── 142.in │ ├── 143.in │ ├── 144.in │ ├── 145.in │ ├── 146.in │ ├── 147.in │ ├── 148.in │ ├── 149.in │ ├── 15.in │ ├── 150.in │ ├── 151.in │ ├── 152.in │ ├── 153.in │ ├── 154.in │ ├── 155.in │ ├── 156.in │ ├── 157.in │ ├── 158.in │ ├── 159.in │ ├── 16.in │ ├── 160.in │ ├── 161.in │ ├── 162.in │ ├── 163.in │ ├── 164.in │ ├── 165.in │ ├── 166.in │ ├── 167.in │ ├── 168.in │ ├── 169.in │ ├── 17.in │ ├── 170.in │ ├── 171.in │ ├── 172.in │ ├── 173.in │ ├── 174.in │ ├── 175.in │ ├── 176.in │ ├── 177.in │ ├── 178.in │ ├── 179.in │ ├── 18.in │ ├── 180.in │ ├── 181.in │ ├── 182.in │ ├── 183.in │ ├── 184.in │ ├── 185.in │ ├── 186.in │ ├── 187.in │ ├── 188.in │ ├── 189.in │ ├── 19.in │ ├── 190.in │ ├── 191.in │ ├── 192.in │ ├── 193.in │ ├── 194.in │ ├── 195.in │ ├── 196.in │ ├── 197.in │ ├── 198.in │ ├── 199.in │ ├── 2.in │ ├── 20.in │ ├── 200.in │ ├── 201.in │ ├── 202.in │ ├── 203.in │ ├── 204.in │ ├── 205.in │ ├── 206.in │ ├── 207.in │ ├── 208.in │ ├── 209.in │ ├── 21.in │ ├── 210.in │ ├── 211.in │ ├── 212.in │ ├── 213.in │ ├── 214.in │ ├── 215.in │ ├── 216.in │ ├── 217.in │ ├── 218.in │ ├── 219.in │ ├── 22.in │ ├── 220.in │ ├── 221.in │ ├── 222.in │ ├── 223.in │ ├── 224.in │ ├── 225.in │ ├── 226.in │ ├── 227.in │ ├── 228.in │ ├── 229.in │ ├── 23.in │ ├── 230.in │ ├── 231.in │ ├── 232.in │ ├── 233.in │ ├── 234.in │ ├── 235.in │ ├── 236.in │ ├── 237.in │ ├── 238.in │ ├── 239.in │ ├── 24.in │ ├── 240.in │ ├── 241.in │ ├── 242.in │ ├── 243.in │ ├── 244.in │ ├── 245.in │ ├── 246.in │ ├── 247.in │ ├── 248.in │ ├── 249.in │ ├── 25.in │ ├── 250.in │ ├── 251.in │ ├── 252.in │ ├── 253.in │ ├── 254.in │ ├── 255.in │ ├── 256.in │ ├── 257.in │ ├── 258.in │ ├── 259.in │ ├── 26.in │ ├── 260.in │ ├── 261.in │ ├── 262.in │ ├── 263.in │ ├── 264.in │ ├── 265.in │ ├── 266.in │ ├── 267.in │ ├── 268.in │ ├── 269.in │ ├── 27.in │ ├── 270.in │ ├── 271.in │ ├── 272.in │ ├── 273.in │ ├── 274.in │ ├── 275.in │ ├── 276.in │ ├── 277.in │ ├── 278.in │ ├── 279.in │ ├── 28.in │ ├── 280.in │ ├── 281.in │ ├── 282.in │ ├── 283.in │ ├── 284.in │ ├── 285.in │ ├── 286.in │ ├── 287.in │ ├── 288.in │ ├── 289.in │ ├── 29.in │ ├── 290.in │ ├── 291.in │ ├── 292.in │ ├── 293.in │ ├── 294.in │ ├── 295.in │ ├── 296.in │ ├── 297.in │ ├── 298.in │ ├── 299.in │ ├── 3.in │ ├── 30.in │ ├── 300.in │ ├── 301.in │ ├── 302.in │ ├── 303.in │ ├── 304.in │ ├── 305.in │ ├── 306.in │ ├── 307.in │ ├── 308.in │ ├── 309.in │ ├── 31.in │ ├── 310.in │ ├── 311.in │ ├── 312.in │ ├── 313.in │ ├── 314.in │ ├── 315.in │ ├── 316.in │ ├── 317.in │ ├── 318.in │ ├── 319.in │ ├── 32.in │ ├── 320.in │ ├── 321.in │ ├── 322.in │ ├── 323.in │ ├── 324.in │ ├── 325.in │ ├── 326.in │ ├── 327.in │ ├── 328.in │ ├── 329.in │ ├── 33.in │ ├── 330.in │ ├── 34.in │ ├── 35.in │ ├── 36.in │ ├── 37.in │ ├── 38.in │ ├── 39.in │ ├── 4.in │ ├── 40.in │ ├── 41.in │ ├── 42.in │ ├── 43.in │ ├── 44.in │ ├── 45.in │ ├── 46.in │ ├── 47.in │ ├── 48.in │ ├── 49.in │ ├── 5.in │ ├── 50.in │ ├── 51.in │ ├── 52.in │ ├── 53.in │ ├── 54.in │ ├── 55.in │ ├── 56.in │ ├── 57.in │ ├── 58.in │ ├── 59.in │ ├── 6.in │ ├── 60.in │ ├── 61.in │ ├── 62.in │ ├── 63.in │ ├── 64.in │ ├── 65.in │ ├── 66.in │ ├── 67.in │ ├── 68.in │ ├── 69.in │ ├── 7.in │ ├── 70.in │ ├── 71.in │ ├── 72.in │ ├── 73.in │ ├── 74.in │ ├── 75.in │ ├── 76.in │ ├── 77.in │ ├── 78.in │ ├── 79.in │ ├── 8.in │ ├── 80.in │ ├── 81.in │ ├── 82.in │ ├── 83.in │ ├── 84.in │ ├── 85.in │ ├── 86.in │ ├── 87.in │ ├── 88.in │ ├── 89.in │ ├── 9.in │ ├── 90.in │ ├── 91.in │ ├── 92.in │ ├── 93.in │ ├── 94.in │ ├── 95.in │ ├── 96.in │ ├── 97.in │ ├── 98.in │ ├── 99.in │ └── tables │ │ ├── 1-1.txt │ │ ├── 1-2.txt │ │ ├── 1-3.txt │ │ ├── 1-4.txt │ │ ├── 1.out │ │ ├── 10-1.txt │ │ ├── 10-2.txt │ │ ├── 10.out │ │ ├── 11-1.txt │ │ ├── 11-2.txt │ │ ├── 11.out │ │ ├── 12-1.txt │ │ ├── 12.out │ │ ├── 13-1.txt │ │ ├── 13-2.txt │ │ ├── 13.out │ │ ├── 14-1.txt │ │ ├── 14-2.txt │ │ ├── 14-3.txt │ │ ├── 14.out │ │ ├── 15-1.txt │ │ ├── 15-2.txt │ │ ├── 15-3.txt │ │ ├── 15.out │ │ ├── 16-1.txt │ │ ├── 16-2.txt │ │ ├── 16-3.txt │ │ ├── 16.out │ │ ├── 17-1.txt │ │ ├── 17-2.txt │ │ ├── 17-3.txt │ │ ├── 17.out │ │ ├── 18-1.txt │ │ ├── 18-2.txt │ │ ├── 18-3.txt │ │ ├── 18.out │ │ ├── 19-1.txt │ │ ├── 19-2.txt │ │ ├── 19-3.txt │ │ ├── 19.out │ │ ├── 2-1.txt │ │ ├── 2-2.txt │ │ ├── 2-3.txt │ │ ├── 2-4.txt │ │ ├── 2.out │ │ ├── 20.out │ │ ├── 21-1.txt │ │ ├── 21-2.txt │ │ ├── 21-3.txt │ │ ├── 21.out │ │ ├── 22.out │ │ ├── 24.out │ │ ├── 25.out │ │ ├── 26.out │ │ ├── 27.out │ │ ├── 28.out │ │ ├── 3-1.txt │ │ ├── 3-2.txt │ │ ├── 3.out │ │ ├── 30.out │ │ ├── 31.out │ │ ├── 32.out │ │ ├── 33.out │ │ ├── 34.out │ │ ├── 35.out │ │ ├── 36.out │ │ ├── 37.out │ │ ├── 38.out │ │ ├── 39.out │ │ ├── 4-1.txt │ │ ├── 4-2.txt │ │ ├── 4-3.txt │ │ ├── 4.out │ │ ├── 40.out │ │ ├── 41.out │ │ ├── 42.out │ │ ├── 43.out │ │ ├── 44.out │ │ ├── 45.out │ │ ├── 46.out │ │ ├── 47.out │ │ ├── 48.out │ │ ├── 49.out │ │ ├── 5-1.txt │ │ ├── 5-2.txt │ │ ├── 5.out │ │ ├── 50.out │ │ ├── 51.out │ │ ├── 52.out │ │ ├── 53.out │ │ ├── 54.out │ │ ├── 55.out │ │ ├── 6-1.txt │ │ ├── 6-2.txt │ │ ├── 6-3.txt │ │ ├── 6.out │ │ ├── 7-1.txt │ │ ├── 7.out │ │ ├── 8-1.txt │ │ ├── 8.out │ │ ├── 9-1.txt │ │ ├── 9-2.txt │ │ ├── 9.out │ │ ├── aircraft.txt │ │ ├── certified.txt │ │ ├── employees.txt │ │ └── flights.txt ├── demo │ ├── demo.in │ └── tables │ │ ├── demo.out │ │ ├── parts.txt │ │ └── supplier.txt ├── scythe │ ├── dev_set │ │ ├── 1.in │ │ ├── 2.in │ │ ├── 3.in │ │ └── tables │ │ │ ├── 01-1.txt │ │ │ ├── 01.out │ │ │ ├── 02-1.txt │ │ │ ├── 02.out │ │ │ ├── 03-1.txt │ │ │ └── 03.out │ └── recent_posts │ │ ├── 1.in │ │ ├── 10.in │ │ ├── 11.in │ │ ├── 12.in │ │ ├── 13.in │ │ ├── 14.in │ │ ├── 15.in │ │ ├── 16.in │ │ ├── 17.in │ │ ├── 18.in │ │ ├── 19.in │ │ ├── 2.in │ │ ├── 20.in │ │ ├── 21.in │ │ ├── 22.in │ │ ├── 23.in │ │ ├── 24.in │ │ ├── 25.in │ │ ├── 26.in │ │ ├── 27.in │ │ ├── 28.in │ │ ├── 29.in │ │ ├── 3.in │ │ ├── 30.in │ │ ├── 31.in │ │ ├── 32.in │ │ ├── 33.in │ │ ├── 34.in │ │ ├── 35.in │ │ ├── 36.in │ │ ├── 37.in │ │ ├── 38.in │ │ ├── 39.in │ │ ├── 4.in │ │ ├── 40.in │ │ ├── 41.in │ │ ├── 42.in │ │ ├── 43.in │ │ ├── 44.in │ │ ├── 45.in │ │ ├── 46.in │ │ ├── 47.in │ │ ├── 48.in │ │ ├── 49.in │ │ ├── 5.in │ │ ├── 50.in │ │ ├── 51.in │ │ ├── 6.in │ │ ├── 7.in │ │ ├── 8.in │ │ ├── 9.in │ │ └── tables │ │ ├── 01-1.txt │ │ ├── 01-2.txt │ │ ├── 01.out │ │ ├── 02-1.txt │ │ ├── 02.out │ │ ├── 03-1.txt │ │ ├── 03-2.txt │ │ ├── 03.out │ │ ├── 04-1.txt │ │ ├── 04.out │ │ ├── 05-1.txt │ │ ├── 05.out │ │ ├── 06-1.txt │ │ ├── 06.out │ │ ├── 07-1.txt │ │ ├── 07.out │ │ ├── 09-1.txt │ │ ├── 09.out │ │ ├── 11-1.txt │ │ ├── 11.out │ │ ├── 12-1.txt │ │ ├── 12.out │ │ ├── 13-1.txt │ │ ├── 13-2.txt │ │ ├── 13.out │ │ ├── 14-1.txt │ │ ├── 14-2.txt │ │ ├── 14.out │ │ ├── 16-1.txt │ │ ├── 16-2.txt │ │ ├── 16.out │ │ ├── 17-1.txt │ │ ├── 17.out │ │ ├── 18-1.txt │ │ ├── 18.out │ │ ├── 19-1.txt │ │ ├── 19.out │ │ ├── 21-1.txt │ │ ├── 21.out │ │ ├── 22-1.txt │ │ ├── 22-2.txt │ │ ├── 22.out │ │ ├── 23-1.txt │ │ ├── 23.out │ │ ├── 24-1.txt │ │ ├── 24.out │ │ ├── 25-1.txt │ │ ├── 25.out │ │ ├── 28-1.txt │ │ ├── 28.out │ │ ├── 30-1.txt │ │ ├── 30-2.txt │ │ ├── 30.out │ │ ├── 31-1.txt │ │ ├── 31-2.txt │ │ ├── 31.out │ │ ├── 32-1.txt │ │ ├── 32.out │ │ ├── 34-1.txt │ │ ├── 34.out │ │ ├── 36-1.txt │ │ ├── 36-2.txt │ │ ├── 36.out │ │ ├── 37-1.txt │ │ ├── 37.out │ │ ├── 38-1.txt │ │ ├── 38-2.txt │ │ ├── 38.out │ │ ├── 39-1.txt │ │ ├── 39.out │ │ ├── 40-1.txt │ │ ├── 40.out │ │ ├── 42-1.txt │ │ ├── 42.out │ │ ├── 44-1.txt │ │ ├── 44-2.txt │ │ ├── 44.out │ │ ├── 45-1.txt │ │ ├── 45-2.txt │ │ ├── 45.out │ │ ├── 46-1.txt │ │ ├── 46.out │ │ ├── 47-1.txt │ │ ├── 47.out │ │ ├── 48-1.txt │ │ ├── 48.out │ │ ├── 50-1.txt │ │ ├── 50-2.txt │ │ ├── 50-3.txt │ │ ├── 50.out │ │ ├── 51-1.txt │ │ ├── 51-2.txt │ │ └── 51.out ├── sqlsynthesizer │ ├── 1.in │ ├── 2.in │ ├── 3.in │ ├── 4.in │ ├── 5.in │ └── tables │ │ ├── 01-1.txt │ │ ├── 01.out │ │ ├── 02-1.txt │ │ ├── 02.out │ │ ├── 03-1.txt │ │ ├── 03.out │ │ ├── 04-1.txt │ │ ├── 04-2.txt │ │ ├── 04-3.txt │ │ ├── 04.out │ │ ├── 05-1.txt │ │ ├── 05-2.txt │ │ └── 05.out └── textbook │ ├── 1.in │ ├── 10.in │ ├── 11.in │ ├── 12.in │ ├── 13.in │ ├── 14.in │ ├── 15.in │ ├── 16.in │ ├── 17.in │ ├── 18.in │ ├── 19.in │ ├── 2.in │ ├── 20.in │ ├── 21.in │ ├── 22.in │ ├── 23.in │ ├── 24.in │ ├── 25.in │ ├── 26.in │ ├── 27.in │ ├── 28.in │ ├── 29.in │ ├── 3.in │ ├── 30.in │ ├── 4.in │ ├── 5.in │ ├── 6.in │ ├── 7.in │ ├── 8.in │ ├── 9.in │ └── tables │ ├── 1-1.txt │ ├── 1-2.txt │ ├── 1-3.txt │ ├── 1-4.txt │ ├── 1.out │ ├── 10-1.txt │ ├── 10-2.txt │ ├── 10.out │ ├── 11-1.txt │ ├── 11-2.txt │ ├── 11.out │ ├── 12-1.txt │ ├── 12.out │ ├── 13-1.txt │ ├── 13-2.txt │ ├── 13.out │ ├── 14-1.txt │ ├── 14-2.txt │ ├── 14-3.txt │ ├── 14.out │ ├── 15-1.txt │ ├── 15-2.txt │ ├── 15-3.txt │ ├── 15.out │ ├── 16-1.txt │ ├── 16-2.txt │ ├── 16-3.txt │ ├── 16.out │ ├── 17-1.txt │ ├── 17-2.txt │ ├── 17-3.txt │ ├── 17.out │ ├── 18-1.txt │ ├── 18-2.txt │ ├── 18-3.txt │ ├── 18.out │ ├── 19-1.txt │ ├── 19-2.txt │ ├── 19-3.txt │ ├── 19.out │ ├── 2-1.txt │ ├── 2-2.txt │ ├── 2-3.txt │ ├── 2-4.txt │ ├── 2.out │ ├── 20-1.txt │ ├── 20-2.txt │ ├── 20-3.txt │ ├── 20.out │ ├── 21-1.txt │ ├── 21-2.txt │ ├── 21-3.txt │ ├── 21.out │ ├── 22-1.txt │ ├── 22-2.txt │ ├── 22-3.txt │ ├── 22.out │ ├── 23-1.txt │ ├── 23-2.txt │ ├── 23-3.txt │ ├── 23.out │ ├── 24.out │ ├── 25.out │ ├── 26.out │ ├── 27.out │ ├── 28.out │ ├── 29.out │ ├── 3-1.txt │ ├── 3-2.txt │ ├── 3.out │ ├── 30.out │ ├── 4-1.txt │ ├── 4-2.txt │ ├── 4-3.txt │ ├── 4.out │ ├── 5-1.txt │ ├── 5-2.txt │ ├── 5.out │ ├── 6-1.txt │ ├── 6-2.txt │ ├── 6-3.txt │ ├── 6.out │ ├── 7-1.txt │ ├── 7.out │ ├── 8-1.txt │ ├── 8.out │ ├── 9-1.txt │ ├── 9-2.txt │ ├── 9.out │ ├── aircraft.txt │ ├── certified.txt │ ├── employees.txt │ └── flights.txt ├── tyrell ├── __init__.py ├── decider │ ├── __init__.py │ ├── assert_violation_handler.py │ ├── blame.py │ ├── constraint_encoder.py │ ├── decider.py │ ├── eval_expr.py │ ├── example_base.py │ ├── example_constraint.py │ ├── example_constraint_pruning.py │ ├── result.py │ ├── test_assert_violation_handler.py │ ├── test_eval_expr.py │ ├── test_example.py │ └── test_example_constraint.py ├── dsl │ ├── __init__.py │ ├── builder.py │ ├── indexer.py │ ├── iterator.py │ ├── node.py │ ├── parent_finder.py │ └── test_dsl.py ├── enumerator │ ├── __init__.py │ ├── enumerator.py │ ├── exhaustive.py │ ├── from_iterator.py │ ├── gen_lattices.py │ ├── lattices │ │ ├── loc-3 │ │ ├── loc-4 │ │ ├── loc-5 │ │ ├── loc-6 │ │ └── loc-7 │ ├── lines.py │ ├── optimizer.py │ ├── random.py │ └── smt.py ├── interpreter │ ├── __init__.py │ ├── context.py │ ├── error.py │ ├── interpreter.py │ ├── post_order.py │ └── test_interpreter.py ├── logger.py ├── parse_tyrell_spec.py ├── spec │ ├── __init__.py │ ├── desugar.py │ ├── do_parse.py │ ├── expr.py │ ├── parser.py │ ├── predicate.py │ ├── production.py │ ├── spec.py │ ├── test_spec.py │ ├── type.py │ ├── tyrell.lark │ └── util.py ├── synthesizer │ ├── __init__.py │ └── synthesizer.py └── visitor.py └── users ├── files └── f1 └── tables └── o1 /__init__.py: -------------------------------------------------------------------------------- 1 | from .squaresEnumerator import * 2 | -------------------------------------------------------------------------------- /config.sh: -------------------------------------------------------------------------------- 1 | conda update -y -n base conda 2 | conda create -n squares -y python=3.7 anaconda 3 | chmod +x config_squares.sh 4 | -------------------------------------------------------------------------------- /config_squares.sh: -------------------------------------------------------------------------------- 1 | conda install -n squares -y -c r r-dplyr r-dbplyr r-tidyr r-stringr r-rsqlite rpy2 2 | pip install sexpdata z3-solver Click sqlparse 3 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. Tyrell documentation master file, created by 2 | sphinx-quickstart on Sat Jan 12 12:55:00 2019. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to Tyrell's documentation! 7 | ================================== 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | 12 | tutorial/index 13 | source/modules 14 | -------------------------------------------------------------------------------- /docs/source/modules.rst: -------------------------------------------------------------------------------- 1 | Tyrell Source Documentation 2 | =========================== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | tyrell 8 | -------------------------------------------------------------------------------- /docs/tutorial/index.rst: -------------------------------------------------------------------------------- 1 | A Tutorial 2 | ================================== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | 00_setup 8 | 01_language 9 | 02_synthesizer_basic 10 | 03_synthesizer_deduction 11 | -------------------------------------------------------------------------------- /mypy.ini: -------------------------------------------------------------------------------- 1 | [mypy] 2 | no_implicit_optional = True 3 | warn_return_any = True 4 | 5 | # mypy has no stub for these modules 6 | [mypy-setuptools] 7 | ignore_missing_imports = True 8 | [mypy-sexpdata] 9 | ignore_missing_imports = True 10 | [mypy-z3] 11 | ignore_missing_imports = True 12 | [mypy-rpy2.*] 13 | ignore_missing_imports = True 14 | 15 | # This module is generated by Lark and we have no control over it 16 | [mypy-spec.parser] 17 | ignore_errors = True -------------------------------------------------------------------------------- /other-scripts/setup.r: -------------------------------------------------------------------------------- 1 | install.packages("dplyr",repos = "http://cran.us.r-project.org") 2 | install.packages("dbplyr",repos = "http://cran.us.r-project.org") 3 | install.packages("tidyr",repos = "http://cran.us.r-project.org") 4 | install.packages("stringr",repos = "http://cran.us.r-project.org") 5 | install.packages("RSQLite",repos = "http://cran.us.r-project.org") 6 | -------------------------------------------------------------------------------- /other-versions/tests-examples-original.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/squares-sql/SQUARES/68d1cdea5f4e42aae7eb665811c2d6c8224ec7b0/other-versions/tests-examples-original.zip -------------------------------------------------------------------------------- /setup.r: -------------------------------------------------------------------------------- 1 | install.packages("dplyr",repos = "http://cran.us.r-project.org") 2 | install.packages("dbplyr",repos = "http://cran.us.r-project.org") 3 | install.packages("tidyr",repos = "http://cran.us.r-project.org") 4 | install.packages("stringr",repos = "http://cran.us.r-project.org") 5 | install.packages("RSQLite",repos = "http://cran.us.r-project.org") 6 | -------------------------------------------------------------------------------- /tests-examples/55-tests/10.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/55-tests/tables/10-1.txt, tests-examples/55-tests/tables/10-2.txt 2 | output: tests-examples/55-tests/tables/10.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 3 8 | 9 | # 5.1.10 optimal solution 10 | 11 | inner_join(student,enrolled) %>% 12 | group_by(sname) %>% summarise (n = n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/55-tests/11.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/55-tests/tables/11-1.txt, tests-examples/55-tests/tables/11-2.txt 2 | output: tests-examples/55-tests/tables/11.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 1 8 | 9 | # 5.1.11 optimal solution 10 | 11 | anti_join(student,enrolled) %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/55-tests/12.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/55-tests/tables/12-1.txt 2 | output: tests-examples/55-tests/tables/12.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 2 8 | 9 | # 5.1.12 optimal solution 10 | 11 | student %>% group_by(age,level) %>% summarise(n = n()) %>% 12 | filter(n==max(n)) %>% select(-n) -------------------------------------------------------------------------------- /tests-examples/55-tests/13.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/55-tests/tables/13-1.txt, tests-examples/55-tests/tables/13-2.txt 2 | output: tests-examples/55-tests/tables/13.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 1 8 | 9 | # 5.2.1 optimal solution 10 | 11 | inner_join(parts,catalog) %>% select(part_name) -------------------------------------------------------------------------------- /tests-examples/55-tests/14.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/55-tests/tables/14-1.txt, tests-examples/55-tests/tables/14-2.txt, tests-examples/55-tests/tables/14-3.txt 2 | output: tests-examples/55-tests/tables/14.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 3 8 | 9 | # 5.2.2 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | group_by(sname) %>% summarise(n=n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/55-tests/21.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/55-tests/tables/21-1.txt, tests-examples/55-tests/tables/21-2.txt, tests-examples/55-tests/tables/21-3.txt 2 | output: tests-examples/55-tests/tables/21.out 3 | const: "red", "green" 4 | aggrs: 5 | attrs: "color" 6 | bools: "==" 7 | loc: 2 8 | 9 | # 5.2.9 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | filter(color == "red" | color == "green") %>% select(sname) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/55-tests/27.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/55-tests/tables/17-1.txt, tests-examples/55-tests/tables/17-2.txt 2 | output: tests-examples/55-tests/tables/27.out 3 | const: 4 | aggrs: "mean" 5 | attrs: "cost" 6 | bools: "<=" 7 | loc: 4 8 | 9 | # 5.2.5 optimal solution modified 10 | 11 | df1 <- inner_join(catalog,parts) %>% 12 | group_by(P_id) %>% summarise(mean = mean(cost)) 13 | out <- inner_join(catalog,parts) %>% inner_join(df1) %>% 14 | filter(cost <= mean) %>% select(P_id,S_name) -------------------------------------------------------------------------------- /tests-examples/55-tests/3.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/55-tests/tables/3-1.txt, tests-examples/55-tests/tables/3-2.txt 2 | output: tests-examples/55-tests/tables/3.out 3 | const: "R128", "4" 4 | aggrs: "n" 5 | attrs: "Room" 6 | bools: ">", "==" 7 | loc: 3 8 | 9 | # 5.1.3 optimal solution 10 | 11 | inner_join(id_class_5_1_3,id_enroll_5_1_3) %>% 12 | group_by(ID_key,Room) %>% summarize(n = n()) %>% 13 | filter(Room == "R128" | n > 4) %>% select(ID_key) -------------------------------------------------------------------------------- /tests-examples/55-tests/37.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/55-tests/tables/21-1.txt, tests-examples/55-tests/tables/21-2.txt, tests-examples/55-tests/tables/21-3.txt 2 | output: tests-examples/55-tests/tables/37.out 3 | const: 4 | aggrs: "n" 5 | attrs: 6 | bools: 7 | loc: 4 8 | 9 | # 5.2.9 optimal solution 10 | 11 | inner_join( 12 | inner_join(catalog,suppliers), 13 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 14 | group_by(P_id) %>% summarise(n = n())) %>% select(S_name) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/55-tests/5.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/55-tests/tables/5-1.txt, tests-examples/55-tests/tables/5-2.txt 2 | output: tests-examples/55-tests/tables/5.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 3 8 | 9 | # 5.1.5 optimal solution 10 | 11 | inner_join(class,faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter(n == max(n)) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/55-tests/52.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/55-tests/tables/aircraft.txt, tests-examples/55-tests/tables/employees.txt, tests-examples/55-tests/tables/certified.txt 2 | output: tests-examples/55-tests/tables/52.out 3 | const: "10000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 4 8 | 9 | # 5.3.1 modified optimal solution sql 10 | 11 | inner_join(employees, 12 | anti_join( 13 | filter(employees, salary > 10000), 14 | inner_join(certified, aircraft))) %>% select(eid) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/55-tests/54.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/55-tests/tables/aircraft.txt, tests-examples/55-tests/tables/certified.txt 2 | output: tests-examples/55-tests/tables/54.out 3 | const: "3" 4 | aggrs: "n" 5 | attrs: 6 | bools: ">" 7 | loc: 4 8 | 9 | # 5.3.2 optimal solution sql 10 | 11 | out <- inner_join( 12 | inner_join(certified, aircraft), 13 | certified %>% group_by(eid) %>% summarise(n = n()) %>% 14 | filter(n < 3)) %>% select(eid) %>% distinct() 15 | -------------------------------------------------------------------------------- /tests-examples/55-tests/6.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/55-tests/tables/6-1.txt, tests-examples/55-tests/tables/6-2.txt, tests-examples/55-tests/tables/6-3.txt 2 | output: tests-examples/55-tests/tables/6.out 3 | const: "5" 4 | aggrs: "n" 5 | attrs: 6 | bools: "<=" 7 | loc: 3 8 | 9 | # 5.1.6 optimal solution 10 | 11 | inner_join(class, enroll) %>% inner_join(faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter (n <= 5) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/55-tests/7.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/55-tests/tables/7-1.txt 2 | output: tests-examples/55-tests/tables/7.out 3 | const: 4 | aggrs: "mean" 5 | attrs: "age" 6 | bools: 7 | loc: 1 8 | 9 | # 5.1.7 optimal solution 10 | 11 | student %>% group_by(level) %>% summarise(average=mean(age)) -------------------------------------------------------------------------------- /tests-examples/55-tests/8.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/55-tests/tables/8-1.txt 2 | output: tests-examples/55-tests/tables/8.out 3 | const: "JR" 4 | aggrs: "mean" 5 | attrs: "level", "age" 6 | bools: "!=" 7 | loc: 2 8 | 9 | # 5.1.8 optimal solution 10 | 11 | student %>% group_by(level) %>% summarize(average=mean(age)) %>% 12 | filter(level != "JR") -------------------------------------------------------------------------------- /tests-examples/55-tests/small_examples/1.txt: -------------------------------------------------------------------------------- 1 | C_name,F_key 2 | class1,f1 3 | class2,f2 4 | class3,f1 5 | class4,f3 6 | class5,f4 -------------------------------------------------------------------------------- /tests-examples/55-tests/small_examples/2.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class1 3 | S2,class1 4 | S3,class2 5 | S3,class5 6 | S4,class2 7 | S4,class4 8 | S5,class3 9 | S6,class3 10 | S6,class2 11 | S7,class5 12 | S8,class4 -------------------------------------------------------------------------------- /tests-examples/55-tests/small_examples/3.txt: -------------------------------------------------------------------------------- 1 | F_key,F_name 2 | f1,faculty1 3 | f2,faculty2 4 | f3,faculty3 5 | f4,faculty4 6 | -------------------------------------------------------------------------------- /tests-examples/55-tests/small_examples/4.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name,level 2 | S1,stu1,JR 3 | S2,stu2,SR 4 | S3,stu3,JR 5 | S4,stu4,SR 6 | S5,stu5,JR 7 | S6,stu6,SR 8 | S7,stu7,JR 9 | S8,stu8,JR -------------------------------------------------------------------------------- /tests-examples/55-tests/small_examples/5.txt: -------------------------------------------------------------------------------- 1 | S_key,level,age 2 | S1,JR,18 3 | S2,SR,24 4 | S3,JR,21 5 | S4,SR,22 6 | S5,JR,18 7 | S6,SO,20 8 | S7,SO,22 -------------------------------------------------------------------------------- /tests-examples/55-tests/small_examples/filter-13.txt: -------------------------------------------------------------------------------- 1 | C_name,F_key,F_name 2 | class1,f1,faculty1 3 | class3,f1,faculty1 4 | -------------------------------------------------------------------------------- /tests-examples/55-tests/small_examples/filter-select-13.txt: -------------------------------------------------------------------------------- 1 | C_name,F_name 2 | class1,faculty1 3 | class3,faculty1 4 | -------------------------------------------------------------------------------- /tests-examples/55-tests/small_examples/join-124.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name,S_name,level,F_key 2 | S1,class1,stu1,JR,f1 3 | S2,class1,stu2,SR,f1 4 | S3,class2,stu3,JR,f2 5 | S3,class5,stu3,JR,f4 6 | S4,class2,stu4,SR,f2 7 | S4,class4,stu4,SR,f3 8 | S5,class3,stu5,JR,f1 9 | S6,class3,stu6,SR,f1 10 | S6,class2,stu6,SR,f2 11 | S7,class5,stu7,JR,f4 12 | S8,class4,stu8,JR,f3 -------------------------------------------------------------------------------- /tests-examples/55-tests/small_examples/join-13.txt: -------------------------------------------------------------------------------- 1 | C_name,F_key,F_name 2 | class1,f1,faculty1 3 | class2,f2,faculty2 4 | class3,f1,faculty1 5 | class4,f3,faculty3 6 | class5,f4,faculty4 -------------------------------------------------------------------------------- /tests-examples/55-tests/small_examples/join-24.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name,S_name,level 2 | S1,class1,stu1,JR 3 | S2,class1,stu2,SR 4 | S3,class2,stu3,JR 5 | S3,class5,stu3,JR 6 | S4,class2,stu4,SR 7 | S4,class4,stu4,SR 8 | S5,class3,stu5,JR 9 | S6,class3,stu6,SR 10 | S6,class2,stu6,SR 11 | S7,class5,stu7,JR 12 | S8,class4,stu8,JR 13 | -------------------------------------------------------------------------------- /tests-examples/55-tests/small_examples/n-13.txt: -------------------------------------------------------------------------------- 1 | F_name,n 2 | faculty1,2 3 | faculty2,1 4 | faculty3,1 5 | faculty4,1 6 | -------------------------------------------------------------------------------- /tests-examples/55-tests/small_examples/sel-join-124.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name,F_key 2 | S1,class1,f1 3 | S2,class1,f1 4 | S3,class2,f2 5 | S3,class5,f4 6 | S4,class2,f2 7 | S4,class4,f3 8 | S5,class3,f1 9 | S6,class3,f1 10 | S6,class2,f2 11 | S7,class5,f4 12 | S8,class4,f3 -------------------------------------------------------------------------------- /tests-examples/55-tests/small_examples/select-13.txt: -------------------------------------------------------------------------------- 1 | C_name,F_name 2 | class1,faculty1 3 | class2,faculty2 4 | class3,faculty1 5 | class4,faculty3 6 | class5,faculty4 -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/1-1.txt: -------------------------------------------------------------------------------- 1 | C_name,F_key 2 | class1,f1 3 | class2,f2 4 | class3,f1 5 | class4,f3 6 | class5,f4 7 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/1-2.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class1 3 | S2,class1 4 | S3,class2 5 | S3,class5 6 | S4,class2 7 | S4,class4 8 | S5,class3 9 | S6,class3 10 | S6,class2 11 | S7,class5 12 | S8,class4 13 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/1-3.txt: -------------------------------------------------------------------------------- 1 | F_key,F_name 2 | f1,faculty1 3 | f2,faculty2 4 | f3,faculty3 5 | f4,faculty4 6 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/1-4.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name,level 2 | S1,stu1,JR 3 | S2,stu2,SR 4 | S3,stu3,JR 5 | S4,stu4,SR 6 | S5,stu5,JR 7 | S6,stu6,SR 8 | S7,stu7,JR 9 | S8,stu8,JR 10 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/1.out: -------------------------------------------------------------------------------- 1 | S_name 2 | stu1 3 | stu5 4 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/10-1.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class1 3 | S1,class2 4 | S2,class1 5 | S2,class2 6 | S2,class3 7 | S3,class1 8 | S4,class3 9 | S4,class2 10 | S5,class1 11 | S5,class2 12 | S5,class4 13 | S6,class3 14 | S6,class4 15 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/10-2.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,stu1 3 | S2,stu2 4 | S3,stu3 5 | S4,stu4 6 | S5,stu5 7 | S6,stu6 8 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/10.out: -------------------------------------------------------------------------------- 1 | S_name 2 | stu2 3 | stu5 4 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/11-1.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | S6,SN6 8 | S7,SN7 9 | S8,SN8 10 | S9,SN9 11 | S10,SN10 12 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/11-2.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class2 3 | S2,class1 4 | S4,class2 5 | S4,class4 6 | S5,class4 7 | S7,class5 8 | S7,class1 9 | S8,class4 10 | S10,class5 11 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/11.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN3 3 | SN6 4 | SN9 5 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/12-1.txt: -------------------------------------------------------------------------------- 1 | S_key,age,level 2 | S1,19,SO 3 | S2,19,JR 4 | S3,19,JR 5 | S4,20,SO 6 | S5,20,JR 7 | S6,20,SO 8 | S7,21,SO 9 | S8,21,SO 10 | S9,21,SR 11 | S10,22,SR 12 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/12.out: -------------------------------------------------------------------------------- 1 | age,level 2 | 19,JR 3 | 20,SO 4 | 21,SO 5 | 22,SR 6 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/13-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P4 4 | S2,P2 5 | S2,P3 6 | S3,P5 7 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/13-2.txt: -------------------------------------------------------------------------------- 1 | P_id,P_name 2 | P1,PN1 3 | P2,PN2 4 | P3,PN3 5 | P4,PN4 6 | P5,PN5 7 | P6,PN6 8 | P7,PN7 9 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/13.out: -------------------------------------------------------------------------------- 1 | P_name 2 | PN1 3 | PN2 4 | PN3 5 | PN4 6 | PN5 7 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/14-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P2 4 | S2,P1 5 | S2,P2 6 | S2,P3 7 | S3,P3 8 | S4,P2 9 | S5,P1 10 | S5,P2 11 | S5,P3 12 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/14-2.txt: -------------------------------------------------------------------------------- 1 | P_id,color 2 | P1,red 3 | P2,green 4 | P3,yellow 5 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/14-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/14.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN2 3 | SN5 4 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/15-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P4 4 | S2,P1 5 | S2,P3 6 | S3,P1 7 | S4,P4 8 | S5,P4 9 | S5,P2 10 | S5,P1 11 | S6,P5 12 | S7,P6 13 | S8,P4 14 | S8,P1 15 | S8,P6 16 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/15-2.txt: -------------------------------------------------------------------------------- 1 | P_id,color 2 | P1,red 3 | P2,green 4 | P3,yellow 5 | P4,red 6 | P5,green 7 | P6,yellow 8 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/15-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | S6,SN6 8 | S7,SN7 9 | S8,SN8 10 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/15.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN5 4 | SN8 5 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/16-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S2,P1 4 | S1,P2 5 | S2,P2 6 | S3,P2 7 | S3,P3 8 | S1,P4 9 | S3,P3 10 | S2,P5 11 | S3,P5 12 | S3,P6 13 | S1,P7 14 | S2,P8 15 | S4,P9 16 | S3,P9 17 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/16-2.txt: -------------------------------------------------------------------------------- 1 | P_id,P_name 2 | P1,PN1 3 | P2,PN2 4 | P3,PN3 5 | P4,PN4 6 | P5,PN5 7 | P6,PN6 8 | P7,PN7 9 | P8,PN8 10 | P9,PN9 11 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/16-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,AWS 5 | S4,AWS 6 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/16.out: -------------------------------------------------------------------------------- 1 | P_name 2 | PN3 3 | PN6 4 | PN9 5 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/17-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id,cost 2 | S1,P1,4 3 | S2,P1,2 4 | S1,P2,4 5 | S2,P2,2 6 | S3,P2,3 7 | S3,P3,4 8 | S1,P4,2 9 | S4,P3,6 10 | S2,P5,4 11 | S3,P5,2 12 | S3,P6,4 13 | S1,P7,2 14 | S2,P8,4 15 | S4,P9,4 16 | S3,P9,6 17 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/17-2.txt: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN1 3 | P2,SN1 4 | P3,SN4 5 | P5,SN2 6 | P9,SN3 7 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/17-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/17.out: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN1 3 | P2,SN1 4 | P3,SN4 5 | P5,SN2 6 | P9,SN3 7 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/18-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id,cost 2 | S1,P1,1 3 | S2,P1,2 4 | S1,P2,3 5 | S2,P2,2 6 | S3,P2,2 7 | S3,P3,4 8 | S1,P4,2 9 | S4,P3,5 10 | S2,P5,1 11 | S3,P5,2 12 | S3,P6,3 13 | S1,P7,2 14 | S2,P8,4 15 | S4,P9,4 16 | S3,P9,5 17 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/18-2.txt: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN1 3 | P2,SN1 4 | P3,SN4 5 | P5,SN2 6 | P9,SN3 7 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/18-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/18.out: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN2 3 | P2,SN1 4 | P4,SN1 5 | P3,SN4 6 | P5,SN3 7 | P6,SN3 8 | P7,SN1 9 | P8,SN2 10 | P9,SN3 11 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/19-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P4 4 | S2,P1 5 | S2,P3 6 | S3,P1 7 | S4,P4 8 | S5,P4 9 | S5,P2 10 | S6,P5 11 | S7,P6 12 | S8,P4 13 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/19-2.txt: -------------------------------------------------------------------------------- 1 | P_id,color 2 | P1,red 3 | P2,green 4 | P3,yellow 5 | P4,red 6 | P5,green 7 | P6,yellow 8 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/19-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | S6,SN6 8 | S7,SN7 9 | S8,SN8 10 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/19.out: -------------------------------------------------------------------------------- 1 | S_key,P_id,S_name,color 2 | S1,P1,SN1,red 3 | S1,P4,SN1,red 4 | S2,P1,SN2,red 5 | S3,P1,SN3,red 6 | S4,P4,SN4,red 7 | S5,P4,SN5,red 8 | S8,P4,SN8,red 9 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/2-1.txt: -------------------------------------------------------------------------------- 1 | C_name,F_key 2 | class1,f1 3 | class2,f2 4 | class3,f1 5 | class4,f3 6 | class5,f4 7 | class6,f1 8 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/2-2.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class2 3 | S2,class1 4 | S3,class2 5 | S3,class5 6 | S4,class2 7 | S4,class4 8 | S5,class4 9 | S6,class3 10 | S6,class2 11 | S7,class5 12 | S7,class1 13 | S8,class4 14 | S9,class5 15 | S9,class2 16 | S10,class5 17 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/2-3.txt: -------------------------------------------------------------------------------- 1 | F_key,F_name 2 | f1,faculty1 3 | f2,faculty2 4 | f3,faculty3 5 | f4,faculty4 6 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/2-4.txt: -------------------------------------------------------------------------------- 1 | S_key,major,age 2 | S1,History,20 3 | S2,Computer,21 4 | S3,Computer,23 5 | S4,Math,18 6 | S5,History,22 7 | S6,Math,22 8 | S7,English,21 9 | S8,English,23 10 | S9,History,21 11 | S10,History,22 12 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/2.out: -------------------------------------------------------------------------------- 1 | maxage 2 | 22 3 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/20.out: -------------------------------------------------------------------------------- 1 | S_key,P_id,S_name,color 2 | 1,S1,P1,SN1,red 3 | 2,S1,P4,SN1,red 4 | 3,S2,P1,SN2,red 5 | 4,S3,P1,SN3,red 6 | 5,S4,P4,SN4,red 7 | 6,S5,P4,SN5,red 8 | 7,S8,P4,SN8,red 9 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/21-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P4 4 | S2,P2 5 | S2,P3 6 | S3,P5 7 | S4,P3 8 | S4,P6 9 | S5,P4 10 | S5,P2 11 | S6,P4 12 | S7,P6 13 | S8,P5 14 | S8,P2 15 | S9,P1 16 | S10,P6 17 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/21-2.txt: -------------------------------------------------------------------------------- 1 | P_id,color 2 | P1,red 3 | P2,green 4 | P3,yellow 5 | P4,red 6 | P5,green 7 | P6,blue 8 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/21-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | S6,SN6 8 | S7,SN7 9 | S8,SN8 10 | S9,SN9 11 | S10,SN10 12 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/21.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN9 4 | SN2 5 | SN5 6 | SN8 7 | SN6 8 | SN3 9 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/22.out: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN1 3 | P2,SN1 4 | P2,SN3 5 | P3,SN4 6 | P5,SN2 7 | P9,SN3 8 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/24.out: -------------------------------------------------------------------------------- 1 | aname 2 | Boeing 747-400 3 | Boeing 737-800 4 | Airbus A340-300 5 | British Aerospace Jetstream 41 6 | Embraer ERJ-145 7 | SAAB 340 8 | Piper Archer III 9 | Tupolev 154 10 | Lockheed L1011 11 | Boeing 757-300 12 | Boeing 777-300 13 | Boeing 767-400ER 14 | Airbus A320 15 | Airbus A319 16 | Boeing 727 17 | 18 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/25.out: -------------------------------------------------------------------------------- 1 | eid 2 | 142519864 3 | 269734834 4 | 567354612 5 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/26.out: -------------------------------------------------------------------------------- 1 | ename 2 | Karen Scott 3 | Mark Young 4 | Lisa Walker 5 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/27.out: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN1 3 | P2,SN1 4 | P2,SN1 5 | P3,SN4 6 | P5,SN2 7 | P9,SN3 8 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/28.out: -------------------------------------------------------------------------------- 1 | aname 2 | Piper Archer III 3 | Boeing 757-300 4 | Boeing 767-400ER 5 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/3-1.txt: -------------------------------------------------------------------------------- 1 | ID_key,Room 2 | C1,R102 3 | C2,R120 4 | C3,R128 5 | C4,R127 6 | C5,R131 7 | C6,R128 8 | C7,R130 9 | C8,R130 10 | C9,R128 11 | C10,R102 12 | C11,R120 13 | C12,R131 14 | C13,R127 15 | C14,R131 16 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/3-2.txt: -------------------------------------------------------------------------------- 1 | ID_key_student,ID_key 2 | S1,C1 3 | S1,C2 4 | S2,C1 5 | S2,C3 6 | S2,C4 7 | S3,C2 8 | S3,C4 9 | S4,C1 10 | S4,C5 11 | S5,C5 12 | S6,C1 13 | S6,C5 14 | S7,C2 15 | S7,C3 16 | S7,C5 17 | S8,C1 18 | S9,C5 19 | S10,C5 20 | S10,C6 21 | S9,C7 22 | S8,C8 23 | S8,C9 24 | S10,C10 25 | S1,C11 26 | S2,C11 27 | S3,C11 28 | S4,C11 29 | S5,C11 30 | S7,C12 31 | S8,C12 32 | S7,C13 33 | S1,C13 34 | S2,C13 35 | S4,C13 36 | S9,C14 37 | S10,C14 38 | S5,C14 39 | S6,C14 40 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/3.out: -------------------------------------------------------------------------------- 1 | ID_key 2 | C1 3 | C11 4 | C3 5 | C5 6 | C6 7 | C9 8 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/30.out: -------------------------------------------------------------------------------- 1 | P_id,n 2 | P4,1 3 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/31.out: -------------------------------------------------------------------------------- 1 | S_key,P_id,S_name,color 2 | S5,P2,SN5,green 3 | S6,P5,SN6,green 4 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/32.out: -------------------------------------------------------------------------------- 1 | P_id,n 2 | P2,1 3 | P5,1 4 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/33.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN2 3 | SN5 4 | SN8 5 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/34.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN5 4 | SN6 5 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/35.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN2 4 | SN3 5 | SN4 6 | SN8 7 | SN9 8 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/36.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN9 4 | SN5 5 | SN6 6 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/37.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN2 4 | SN3 5 | SN4 6 | SN5 7 | SN6 8 | SN7 9 | SN8 10 | SN9 11 | SN10 12 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/38.out: -------------------------------------------------------------------------------- 1 | eid,n,maxcrusingrange 2 | 11564812,2,4010 3 | 90873519,1,2128 4 | 141582651,3,6475 5 | 142519864,8,8430 6 | 159542516,2,1530 7 | 242518965,2,4010 8 | 269734834,15,8430 9 | 274878974,2,6475 10 | 310454876,2,6900 11 | 355548984,2,6900 12 | 356187925,1,2128 13 | 390487451,3,7120 14 | 548977562,1,520 15 | 550156548,2,8430 16 | 552455318,3,3383 17 | 556784565,3,7120 18 | 567354612,11,8430 19 | 573284895,3,7120 20 | 574489456,2,4103 21 | 574489457,1,520 22 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/39.out: -------------------------------------------------------------------------------- 1 | aname 2 | Boeing 747-400 3 | Boeing 737-800 4 | Airbus A340-300 5 | British Aerospace Jetstream 41 6 | Embraer ERJ-145 7 | SAAB 340 8 | Piper Archer III 9 | Tupolev 154 10 | Lockheed L1011 11 | Boeing 757-300 12 | Boeing 777-300 13 | Boeing 767-400ER 14 | Airbus A320 15 | Airbus A319 16 | Boeing 727 17 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/4-1.txt: -------------------------------------------------------------------------------- 1 | C_name,meets_at 2 | class1,mon 3 | class2,mon 4 | class3,tue 5 | class4,tue 6 | class5,fri 7 | class6,fri 8 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/4-2.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class1 3 | S1,class2 4 | S1,class3 5 | S2,class1 6 | S3,class2 7 | S3,class5 8 | S3,class4 9 | S4,class2 10 | S4,class4 11 | S5,class3 12 | S6,class3 13 | S6,class4 14 | S7,class1 15 | S7,class3 16 | S7,class5 17 | S8,class4 18 | S9,class5 19 | S9,class6 20 | S10,class4 21 | S10,class5 22 | S10,class6 23 | S11,class3 24 | S11,class6 25 | S12,class1 26 | S12,class2 27 | S13,class3 28 | S13,class4 29 | S14,class5 30 | S14,class6 31 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/4-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,stu1 3 | S2,stu2 4 | S3,stu3 5 | S4,stu4 6 | S5,stu5 7 | S6,stu6 8 | S7,stu7 9 | S8,stu8 10 | S9,stu9 11 | S10,stu10 12 | S11,stu11 13 | S12,stu12 14 | S13,stu13 15 | S14,stu14 16 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/4.out: -------------------------------------------------------------------------------- 1 | S_name 2 | stu1 3 | stu10 4 | stu12 5 | stu13 6 | stu14 7 | stu6 8 | stu9 9 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/41.out: -------------------------------------------------------------------------------- 1 | ename 2 | John Williams 3 | Mary Johnson 4 | Betty Adams 5 | James Smith 6 | George Wright 7 | Joseph Thompson 8 | Angela Martinez 9 | Lawrence Sperry 10 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/42.out: -------------------------------------------------------------------------------- 1 | S_name,n 2 | SN1,2 3 | SN2,1 4 | SN3,1 5 | SN4,1 6 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/43.out: -------------------------------------------------------------------------------- 1 | S_name,n 2 | SN1,3 3 | SN2,2 4 | SN3,3 5 | SN4,1 6 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/44.out: -------------------------------------------------------------------------------- 1 | P_name 2 | PN2 3 | PN3 4 | PN5 5 | PN6 6 | PN9 7 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/45.out: -------------------------------------------------------------------------------- 1 | F_name,Room 2 | teach7,R128 3 | teach8,R128 4 | teach4,R128 5 | teach5,R128 6 | teach9,R128 7 | teach1,R128 8 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/46.out: -------------------------------------------------------------------------------- 1 | eid,n 2 | 269734834,14 3 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/47.out: -------------------------------------------------------------------------------- 1 | aid,aname 2 | 11,Boeing 777-300 3 | 15,Boeing 727 4 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/48.out: -------------------------------------------------------------------------------- 1 | P_id,S_name,n 2 | P1,SN2,1 3 | P2,SN2,1 4 | P2,SN3,1 5 | P3,SN3,1 6 | P3,SN4,1 7 | P5,SN2,1 8 | P5,SN3,1 9 | P6,SN3,1 10 | P8,SN2,1 11 | P9,SN4,1 12 | P9,SN3,1 13 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/49.out: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P4,SN1 3 | P6,SN3 4 | P7,SN1 5 | P8,SN2 6 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/5-1.txt: -------------------------------------------------------------------------------- 1 | C_name,F_key,Room 2 | C1,F1,R101 3 | C2,F1,R102 4 | C3,F1,R103 5 | C4,F2,R103 6 | C5,F3,R101 7 | C6,F4,R101 8 | C7,F2,R101 9 | C8,F4,R102 10 | C9,F4,R103 11 | C10,F5,R101 12 | C11,F5,R102 13 | C12,F5,R103 14 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/5-2.txt: -------------------------------------------------------------------------------- 1 | F_key,F_name 2 | F1,teach1 3 | F2,teach2 4 | F3,teach3 5 | F4,teach4 6 | F5,teach5 7 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/5.out: -------------------------------------------------------------------------------- 1 | F_name 2 | teach1 3 | teach4 4 | teach5 5 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/50.out: -------------------------------------------------------------------------------- 1 | eid,ename 2 | 242518965,James Smith 3 | 552455318,Larry West 4 | 573284895,Eric Cooper 5 | 574489456,William Jones 6 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/51.out: -------------------------------------------------------------------------------- 1 | S_name,n 2 | SN1,2 3 | SN9,2 4 | SN2,3 5 | SN5,3 6 | SN8,3 7 | SN2,2 8 | SN4,2 9 | SN1,3 10 | SN6,3 11 | SN3,2 12 | SN8,2 13 | SN4,3 14 | SN7,3 15 | SN10,3 16 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/52.out: -------------------------------------------------------------------------------- 1 | eid 2 | 15645489 3 | 248965255 4 | 254099823 5 | 287321212 6 | 310454877 7 | 348121549 8 | 486512566 9 | 489221823 10 | 489456522 11 | 552455348 12 | 619023588 13 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/53.out: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN2 3 | P2,SN2 4 | P3,SN3 5 | P4,SN1 6 | P5,SN3 7 | P6,SN3 8 | P7,SN1 9 | P8,SN2 10 | P9,SN4 11 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/54.out: -------------------------------------------------------------------------------- 1 | eid 2 | 550156548 3 | 11564812 4 | 242518965 5 | 159542516 6 | 90873519 7 | 356187925 8 | 574489456 9 | 548977562 10 | 574489457 11 | 310454876 12 | 355548984 13 | 274878974 14 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/55.out: -------------------------------------------------------------------------------- 1 | ename,eid 2 | Karen Scott,550156548 3 | Mark Young,556784565 4 | Lisa Walker,567354612 5 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/6-1.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class1 3 | S1,class2 4 | S1,class3 5 | S2,class1 6 | S2,class4 7 | S2,class7 8 | S3,class2 9 | S3,class4 10 | S3,class5 11 | S4,class1 12 | S4,class2 13 | S4,class4 14 | S4,class5 15 | S5,class3 16 | S5,class4 17 | S5,class6 18 | S5,class7 19 | S6,class3 20 | S6,class4 21 | S6,class9 22 | S7,class1 23 | S7,class3 24 | S7,class5 25 | S7,class6 26 | S8,class2 27 | S8,class3 28 | S8,class4 29 | S8,class5 30 | S8,class6 31 | S8,class8 32 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/6-2.txt: -------------------------------------------------------------------------------- 1 | C_name,F_key 2 | class1,f1 3 | class2,f2 4 | class3,f2 5 | class4,f3 6 | class5,f3 7 | class6,f3 8 | class7,f4 9 | class8,f4 10 | class9,f1 11 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/6-3.txt: -------------------------------------------------------------------------------- 1 | F_key,F_name 2 | f1,faculty1 3 | f2,faculty2 4 | f3,faculty3 5 | f4,faculty4 6 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/6.out: -------------------------------------------------------------------------------- 1 | F_name 2 | faculty1 3 | faculty4 4 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/7-1.txt: -------------------------------------------------------------------------------- 1 | S_key,level,age 2 | S1,JR,18 3 | S2,SR,24 4 | S3,JR,21 5 | S4,SR,22 6 | S5,JR,18 7 | S6,SO,20 8 | S7,SO,22 9 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/7.out: -------------------------------------------------------------------------------- 1 | level,meanage 2 | JR,19 3 | SO,21 4 | SR,23 5 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/8-1.txt: -------------------------------------------------------------------------------- 1 | S_key,level,age 2 | S1,JR,18 3 | S2,SR,24 4 | S3,JR,21 5 | S4,SR,22 6 | S5,JR,18 7 | S6,SO,20 8 | S7,SO,22 9 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/8.out: -------------------------------------------------------------------------------- 1 | level,meanage 2 | SO,21 3 | SR,23 4 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/9-1.txt: -------------------------------------------------------------------------------- 1 | ID_class,ID_key,Room 2 | C1,F1,R101 3 | C2,F1,R128 4 | C3,F1,R103 5 | C4,F2,R103 6 | C5,F3,R101 7 | C6,F4,R128 8 | C7,F2,R101 9 | C9,F5,R128 10 | C10,F6,R102 11 | C11,F7,R128 12 | C12,F7,R103 13 | C13,F8,R102 14 | C14,F8,R128 15 | C15,F8,R128 16 | C16,F4,R128 17 | C17,F5,R128 18 | C18,F5,R128 19 | C19,F9,R128 20 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/9-2.txt: -------------------------------------------------------------------------------- 1 | ID_key,F_name 2 | F1,teach1 3 | F2,teach2 4 | F3,teach3 5 | F4,teach4 6 | F5,teach5 7 | F6,teach6 8 | F7,teach7 9 | F8,teach8 10 | F9,teach9 11 | -------------------------------------------------------------------------------- /tests-examples/55-tests/tables/9.out: -------------------------------------------------------------------------------- 1 | F_name,n 2 | teach4,2 3 | teach5,3 4 | teach9,1 5 | -------------------------------------------------------------------------------- /tests-examples/cp19/1.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/1-1.txt, tests-examples/cp19/tables/1-2.txt, tests-examples/cp19/tables/1-3.txt, tests-examples/cp19/tables/1-4.txt 2 | output: tests-examples/cp19/tables/1.out 3 | const: "faculty1", "JR" 4 | aggrs: 5 | attrs: "F_name", "level" 6 | bools: "==" 7 | loc: 1 8 | 9 | # 5.1.1 optimal solution 10 | 11 | inner_join(class,enroll) %>% inner_join(faculty) %>% inner_join(student) %>% 12 | filter (F_name == "faculty1" & level == "JR") %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/121.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/21-1.txt, tests-examples/cp19/tables/21-2.txt, tests-examples/cp19/tables/21-3.txt 2 | output: tests-examples/cp19/tables/21.out 3 | const: "red", "green" 4 | aggrs: 5 | attrs: "color" 6 | bools: "==" 7 | loc: 1 8 | 9 | # 5.2.9 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | filter(color == "red" | color == "green") %>% select(sname) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/122.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/21-1.txt, tests-examples/cp19/tables/21-2.txt, tests-examples/cp19/tables/21-3.txt 2 | output: tests-examples/cp19/tables/21.out 3 | const: "red", "green" 4 | aggrs: 5 | attrs: "color" 6 | bools: "==" 7 | loc: 2 8 | 9 | # 5.2.9 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | filter(color == "red" | color == "green") %>% select(sname) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/123.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/21-1.txt, tests-examples/cp19/tables/21-2.txt, tests-examples/cp19/tables/21-3.txt 2 | output: tests-examples/cp19/tables/21.out 3 | const: "red", "green" 4 | aggrs: 5 | attrs: "color" 6 | bools: "==" 7 | loc: 3 8 | 9 | # 5.2.9 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | filter(color == "red" | color == "green") %>% select(sname) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/124.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/21-1.txt, tests-examples/cp19/tables/21-2.txt, tests-examples/cp19/tables/21-3.txt 2 | output: tests-examples/cp19/tables/21.out 3 | const: "red", "green" 4 | aggrs: 5 | attrs: "color" 6 | bools: "==" 7 | loc: 4 8 | 9 | # 5.2.9 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | filter(color == "red" | color == "green") %>% select(sname) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/125.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/21-1.txt, tests-examples/cp19/tables/21-2.txt, tests-examples/cp19/tables/21-3.txt 2 | output: tests-examples/cp19/tables/21.out 3 | const: "red", "green" 4 | aggrs: 5 | attrs: "color" 6 | bools: "==" 7 | loc: 5 8 | 9 | # 5.2.9 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | filter(color == "red" | color == "green") %>% select(sname) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/126.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/21-1.txt, tests-examples/cp19/tables/21-2.txt, tests-examples/cp19/tables/21-3.txt 2 | output: tests-examples/cp19/tables/21.out 3 | const: "red", "green" 4 | aggrs: 5 | attrs: "color" 6 | bools: "==" 7 | loc: 6 8 | 9 | # 5.2.9 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | filter(color == "red" | color == "green") %>% select(sname) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/13.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/3-1.txt, tests-examples/cp19/tables/3-2.txt 2 | output: tests-examples/cp19/tables/3.out 3 | const: "R128", "4" 4 | aggrs: "n" 5 | attrs: "Room" 6 | bools: ">", "==" 7 | loc: 1 8 | 9 | # 5.1.3 optimal solution 10 | 11 | inner_join(id_class_5_1_3,id_enroll_5_1_3) %>% 12 | group_by(ID_key,Room) %>% summarize(n = n()) %>% 13 | filter(Room == "R128" | n > 4) %>% select(ID_key) -------------------------------------------------------------------------------- /tests-examples/cp19/133.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/employees.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/24.out 3 | const: "80000", "100000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 1 8 | 9 | # 5.3.1 optimal solution sql modified 10 | 11 | select_distinct(filters(anti_join(filter(inner_join3(dat0, dat2, dat1), salary >= 80000), filter(dat1, salary <= 100000)), salary > 100000, salary > 100000, |),aname) -------------------------------------------------------------------------------- /tests-examples/cp19/134.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/employees.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/24.out 3 | const: "80000", "100000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 2 8 | 9 | # 5.3.1 optimal solution sql modified 10 | 11 | select_distinct(filters(anti_join(filter(inner_join3(dat0, dat2, dat1), salary >= 80000), filter(dat1, salary <= 100000)), salary > 100000, salary > 100000, |),aname) -------------------------------------------------------------------------------- /tests-examples/cp19/135.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/employees.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/24.out 3 | const: "80000", "100000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 3 8 | 9 | # 5.3.1 optimal solution sql modified 10 | 11 | select_distinct(filters(anti_join(filter(inner_join3(dat0, dat2, dat1), salary >= 80000), filter(dat1, salary <= 100000)), salary > 100000, salary > 100000, |),aname) -------------------------------------------------------------------------------- /tests-examples/cp19/14.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/3-1.txt, tests-examples/cp19/tables/3-2.txt 2 | output: tests-examples/cp19/tables/3.out 3 | const: "R128", "4" 4 | aggrs: "n" 5 | attrs: "Room" 6 | bools: ">", "==" 7 | loc: 2 8 | 9 | # 5.1.3 optimal solution 10 | 11 | inner_join(id_class_5_1_3,id_enroll_5_1_3) %>% 12 | group_by(ID_key,Room) %>% summarize(n = n()) %>% 13 | filter(Room == "R128" | n > 4) %>% select(ID_key) -------------------------------------------------------------------------------- /tests-examples/cp19/15.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/3-1.txt, tests-examples/cp19/tables/3-2.txt 2 | output: tests-examples/cp19/tables/3.out 3 | const: "R128", "4" 4 | aggrs: "n" 5 | attrs: "Room" 6 | bools: ">", "==" 7 | loc: 3 8 | 9 | # 5.1.3 optimal solution 10 | 11 | inner_join(id_class_5_1_3,id_enroll_5_1_3) %>% 12 | group_by(ID_key,Room) %>% summarize(n = n()) %>% 13 | filter(Room == "R128" | n > 4) %>% select(ID_key) -------------------------------------------------------------------------------- /tests-examples/cp19/157.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/17-1.txt, tests-examples/cp19/tables/17-2.txt 2 | output: tests-examples/cp19/tables/27.out 3 | const: 4 | aggrs: "mean" 5 | attrs: "cost" 6 | bools: "<=" 7 | loc: 1 8 | 9 | # 5.2.5 optimal solution modified 10 | 11 | df1 <- inner_join(catalog,parts) %>% 12 | group_by(P_id) %>% summarise(mean = mean(cost)) 13 | out <- inner_join(catalog,parts) %>% inner_join(df1) %>% 14 | filter(cost <= mean) %>% select(P_id,S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/158.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/17-1.txt, tests-examples/cp19/tables/17-2.txt 2 | output: tests-examples/cp19/tables/27.out 3 | const: 4 | aggrs: "mean" 5 | attrs: "cost" 6 | bools: "<=" 7 | loc: 2 8 | 9 | # 5.2.5 optimal solution modified 10 | 11 | df1 <- inner_join(catalog,parts) %>% 12 | group_by(P_id) %>% summarise(mean = mean(cost)) 13 | out <- inner_join(catalog,parts) %>% inner_join(df1) %>% 14 | filter(cost <= mean) %>% select(P_id,S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/159.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/17-1.txt, tests-examples/cp19/tables/17-2.txt 2 | output: tests-examples/cp19/tables/27.out 3 | const: 4 | aggrs: "mean" 5 | attrs: "cost" 6 | bools: "<=" 7 | loc: 3 8 | 9 | # 5.2.5 optimal solution modified 10 | 11 | df1 <- inner_join(catalog,parts) %>% 12 | group_by(P_id) %>% summarise(mean = mean(cost)) 13 | out <- inner_join(catalog,parts) %>% inner_join(df1) %>% 14 | filter(cost <= mean) %>% select(P_id,S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/16.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/3-1.txt, tests-examples/cp19/tables/3-2.txt 2 | output: tests-examples/cp19/tables/3.out 3 | const: "R128", "4" 4 | aggrs: "n" 5 | attrs: "Room" 6 | bools: ">", "==" 7 | loc: 4 8 | 9 | # 5.1.3 optimal solution 10 | 11 | inner_join(id_class_5_1_3,id_enroll_5_1_3) %>% 12 | group_by(ID_key,Room) %>% summarize(n = n()) %>% 13 | filter(Room == "R128" | n > 4) %>% select(ID_key) -------------------------------------------------------------------------------- /tests-examples/cp19/160.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/17-1.txt, tests-examples/cp19/tables/17-2.txt 2 | output: tests-examples/cp19/tables/27.out 3 | const: 4 | aggrs: "mean" 5 | attrs: "cost" 6 | bools: "<=" 7 | loc: 4 8 | 9 | # 5.2.5 optimal solution modified 10 | 11 | df1 <- inner_join(catalog,parts) %>% 12 | group_by(P_id) %>% summarise(mean = mean(cost)) 13 | out <- inner_join(catalog,parts) %>% inner_join(df1) %>% 14 | filter(cost <= mean) %>% select(P_id,S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/161.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/17-1.txt, tests-examples/cp19/tables/17-2.txt 2 | output: tests-examples/cp19/tables/27.out 3 | const: 4 | aggrs: "mean" 5 | attrs: "cost" 6 | bools: "<=" 7 | loc: 5 8 | 9 | # 5.2.5 optimal solution modified 10 | 11 | df1 <- inner_join(catalog,parts) %>% 12 | group_by(P_id) %>% summarise(mean = mean(cost)) 13 | out <- inner_join(catalog,parts) %>% inner_join(df1) %>% 14 | filter(cost <= mean) %>% select(P_id,S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/162.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/17-1.txt, tests-examples/cp19/tables/17-2.txt 2 | output: tests-examples/cp19/tables/27.out 3 | const: 4 | aggrs: "mean" 5 | attrs: "cost" 6 | bools: "<=" 7 | loc: 6 8 | 9 | # 5.2.5 optimal solution modified 10 | 11 | df1 <- inner_join(catalog,parts) %>% 12 | group_by(P_id) %>% summarise(mean = mean(cost)) 13 | out <- inner_join(catalog,parts) %>% inner_join(df1) %>% 14 | filter(cost <= mean) %>% select(P_id,S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/163.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/employees.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/28.out 3 | const: "80000", "100000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 1 8 | 9 | # 5.3.1 modified optimal solution sql 10 | 11 | select(filter(anti_join(filter(inner_join(inner_join(dat2, dat0), dat1), salary >= 80000), filter(dat1, salary == 80000)), salary < 100000), aname) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/164.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/employees.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/28.out 3 | const: "80000", "100000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 2 8 | 9 | # 5.3.1 modified optimal solution sql 10 | 11 | select(filter(anti_join(filter(inner_join(inner_join(dat2, dat0), dat1), salary >= 80000), filter(dat1, salary == 80000)), salary < 100000), aname) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/165.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/employees.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/28.out 3 | const: "80000", "100000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 3 8 | 9 | # 5.3.1 modified optimal solution sql 10 | 11 | select(filter(anti_join(filter(inner_join(inner_join(dat2, dat0), dat1), salary >= 80000), filter(dat1, salary == 80000)), salary < 100000), aname) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/166.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/employees.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/28.out 3 | const: "80000", "100000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 4 8 | 9 | # 5.3.1 modified optimal solution sql 10 | 11 | select(filter(anti_join(filter(inner_join(inner_join(dat2, dat0), dat1), salary >= 80000), filter(dat1, salary == 80000)), salary < 100000), aname) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/167.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/employees.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/28.out 3 | const: "80000", "100000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 5 8 | 9 | # 5.3.1 modified optimal solution sql 10 | 11 | select(filter(anti_join(filter(inner_join(inner_join(dat2, dat0), dat1), salary >= 80000), filter(dat1, salary == 80000)), salary < 100000), aname) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/168.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/employees.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/28.out 3 | const: "80000", "100000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 6 8 | 9 | # 5.3.1 modified optimal solution sql 10 | 11 | select(filter(anti_join(filter(inner_join(inner_join(dat2, dat0), dat1), salary >= 80000), filter(dat1, salary == 80000)), salary < 100000), aname) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/17.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/3-1.txt, tests-examples/cp19/tables/3-2.txt 2 | output: tests-examples/cp19/tables/3.out 3 | const: "R128", "4" 4 | aggrs: "n" 5 | attrs: "Room" 6 | bools: ">", "==" 7 | loc: 5 8 | 9 | # 5.1.3 optimal solution 10 | 11 | inner_join(id_class_5_1_3,id_enroll_5_1_3) %>% 12 | group_by(ID_key,Room) %>% summarize(n = n()) %>% 13 | filter(Room == "R128" | n > 4) %>% select(ID_key) -------------------------------------------------------------------------------- /tests-examples/cp19/18.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/3-1.txt, tests-examples/cp19/tables/3-2.txt 2 | output: tests-examples/cp19/tables/3.out 3 | const: "R128", "4" 4 | aggrs: "n" 5 | attrs: "Room" 6 | bools: ">", "==" 7 | loc: 6 8 | 9 | # 5.1.3 optimal solution 10 | 11 | inner_join(id_class_5_1_3,id_enroll_5_1_3) %>% 12 | group_by(ID_key,Room) %>% summarize(n = n()) %>% 13 | filter(Room == "R128" | n > 4) %>% select(ID_key) -------------------------------------------------------------------------------- /tests-examples/cp19/19.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/4-1.txt, tests-examples/cp19/tables/4-2.txt, tests-examples/cp19/tables/4-3.txt 2 | output: tests-examples/cp19/tables/4.out 3 | const: "2" 4 | aggrs: "n" 5 | attrs: 6 | bools: "==" 7 | loc: 1 8 | 9 | # 5.1.4 optimal solution 10 | 11 | inner_join(class,enroll) %>% inner_join(student) %>% 12 | group_by(S_name,meets_at) %>% summarize(n = n()) %>% 13 | filter(n == 2) %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/2.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/1-1.txt, tests-examples/cp19/tables/1-2.txt, tests-examples/cp19/tables/1-3.txt, tests-examples/cp19/tables/1-4.txt 2 | output: tests-examples/cp19/tables/1.out 3 | const: "faculty1", "JR" 4 | aggrs: 5 | attrs: "F_name", "level" 6 | bools: "==" 7 | loc: 2 8 | 9 | # 5.1.1 optimal solution 10 | 11 | inner_join(class,enroll) %>% inner_join(faculty) %>% inner_join(student) %>% 12 | filter (F_name == "faculty1" & level == "JR") %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/20.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/4-1.txt, tests-examples/cp19/tables/4-2.txt, tests-examples/cp19/tables/4-3.txt 2 | output: tests-examples/cp19/tables/4.out 3 | const: "2" 4 | aggrs: "n" 5 | attrs: 6 | bools: "==" 7 | loc: 2 8 | 9 | # 5.1.4 optimal solution 10 | 11 | inner_join(class,enroll) %>% inner_join(student) %>% 12 | group_by(S_name,meets_at) %>% summarize(n = n()) %>% 13 | filter(n == 2) %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/21.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/4-1.txt, tests-examples/cp19/tables/4-2.txt, tests-examples/cp19/tables/4-3.txt 2 | output: tests-examples/cp19/tables/4.out 3 | const: "2" 4 | aggrs: "n" 5 | attrs: 6 | bools: "==" 7 | loc: 3 8 | 9 | # 5.1.4 optimal solution 10 | 11 | inner_join(class,enroll) %>% inner_join(student) %>% 12 | group_by(S_name,meets_at) %>% summarize(n = n()) %>% 13 | filter(n == 2) %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/217.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/21-1.txt, tests-examples/cp19/tables/21-2.txt, tests-examples/cp19/tables/21-3.txt 2 | output: tests-examples/cp19/tables/37.out 3 | const: 4 | aggrs: "n" 5 | attrs: 6 | bools: 7 | loc: 1 8 | 9 | # 5.2.9 optimal solution 10 | 11 | inner_join( 12 | inner_join(catalog,suppliers), 13 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 14 | group_by(P_id) %>% summarise(n = n())) %>% select(S_name) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/218.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/21-1.txt, tests-examples/cp19/tables/21-2.txt, tests-examples/cp19/tables/21-3.txt 2 | output: tests-examples/cp19/tables/37.out 3 | const: 4 | aggrs: "n" 5 | attrs: 6 | bools: 7 | loc: 2 8 | 9 | # 5.2.9 optimal solution 10 | 11 | inner_join( 12 | inner_join(catalog,suppliers), 13 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 14 | group_by(P_id) %>% summarise(n = n())) %>% select(S_name) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/219.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/21-1.txt, tests-examples/cp19/tables/21-2.txt, tests-examples/cp19/tables/21-3.txt 2 | output: tests-examples/cp19/tables/37.out 3 | const: 4 | aggrs: "n" 5 | attrs: 6 | bools: 7 | loc: 3 8 | 9 | # 5.2.9 optimal solution 10 | 11 | inner_join( 12 | inner_join(catalog,suppliers), 13 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 14 | group_by(P_id) %>% summarise(n = n())) %>% select(S_name) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/22.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/4-1.txt, tests-examples/cp19/tables/4-2.txt, tests-examples/cp19/tables/4-3.txt 2 | output: tests-examples/cp19/tables/4.out 3 | const: "2" 4 | aggrs: "n" 5 | attrs: 6 | bools: "==" 7 | loc: 4 8 | 9 | # 5.1.4 optimal solution 10 | 11 | inner_join(class,enroll) %>% inner_join(student) %>% 12 | group_by(S_name,meets_at) %>% summarize(n = n()) %>% 13 | filter(n == 2) %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/220.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/21-1.txt, tests-examples/cp19/tables/21-2.txt, tests-examples/cp19/tables/21-3.txt 2 | output: tests-examples/cp19/tables/37.out 3 | const: 4 | aggrs: "n" 5 | attrs: 6 | bools: 7 | loc: 4 8 | 9 | # 5.2.9 optimal solution 10 | 11 | inner_join( 12 | inner_join(catalog,suppliers), 13 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 14 | group_by(P_id) %>% summarise(n = n())) %>% select(S_name) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/221.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/21-1.txt, tests-examples/cp19/tables/21-2.txt, tests-examples/cp19/tables/21-3.txt 2 | output: tests-examples/cp19/tables/37.out 3 | const: 4 | aggrs: "n" 5 | attrs: 6 | bools: 7 | loc: 5 8 | 9 | # 5.2.9 optimal solution 10 | 11 | inner_join( 12 | inner_join(catalog,suppliers), 13 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 14 | group_by(P_id) %>% summarise(n = n())) %>% select(S_name) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/222.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/21-1.txt, tests-examples/cp19/tables/21-2.txt, tests-examples/cp19/tables/21-3.txt 2 | output: tests-examples/cp19/tables/37.out 3 | const: 4 | aggrs: "n" 5 | attrs: 6 | bools: 7 | loc: 6 8 | 9 | # 5.2.9 optimal solution 10 | 11 | inner_join( 12 | inner_join(catalog,suppliers), 13 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 14 | group_by(P_id) %>% summarise(n = n())) %>% select(S_name) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/23.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/4-1.txt, tests-examples/cp19/tables/4-2.txt, tests-examples/cp19/tables/4-3.txt 2 | output: tests-examples/cp19/tables/4.out 3 | const: "2" 4 | aggrs: "n" 5 | attrs: 6 | bools: "==" 7 | loc: 5 8 | 9 | # 5.1.4 optimal solution 10 | 11 | inner_join(class,enroll) %>% inner_join(student) %>% 12 | group_by(S_name,meets_at) %>% summarize(n = n()) %>% 13 | filter(n == 2) %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/24.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/4-1.txt, tests-examples/cp19/tables/4-2.txt, tests-examples/cp19/tables/4-3.txt 2 | output: tests-examples/cp19/tables/4.out 3 | const: "2" 4 | aggrs: "n" 5 | attrs: 6 | bools: "==" 7 | loc: 6 8 | 9 | # 5.1.4 optimal solution 10 | 11 | inner_join(class,enroll) %>% inner_join(student) %>% 12 | group_by(S_name,meets_at) %>% summarize(n = n()) %>% 13 | filter(n == 2) %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/25.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/5-1.txt, tests-examples/cp19/tables/5-2.txt 2 | output: tests-examples/cp19/tables/5.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 1 8 | 9 | # 5.1.5 optimal solution 10 | 11 | inner_join(class,faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter(n == max(n)) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/cp19/26.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/5-1.txt, tests-examples/cp19/tables/5-2.txt 2 | output: tests-examples/cp19/tables/5.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 2 8 | 9 | # 5.1.5 optimal solution 10 | 11 | inner_join(class,faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter(n == max(n)) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/cp19/27.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/5-1.txt, tests-examples/cp19/tables/5-2.txt 2 | output: tests-examples/cp19/tables/5.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 3 8 | 9 | # 5.1.5 optimal solution 10 | 11 | inner_join(class,faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter(n == max(n)) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/cp19/28.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/5-1.txt, tests-examples/cp19/tables/5-2.txt 2 | output: tests-examples/cp19/tables/5.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 4 8 | 9 | # 5.1.5 optimal solution 10 | 11 | inner_join(class,faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter(n == max(n)) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/cp19/29.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/5-1.txt, tests-examples/cp19/tables/5-2.txt 2 | output: tests-examples/cp19/tables/5.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 5 8 | 9 | # 5.1.5 optimal solution 10 | 11 | inner_join(class,faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter(n == max(n)) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/cp19/3.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/1-1.txt, tests-examples/cp19/tables/1-2.txt, tests-examples/cp19/tables/1-3.txt, tests-examples/cp19/tables/1-4.txt 2 | output: tests-examples/cp19/tables/1.out 3 | const: "faculty1", "JR" 4 | aggrs: 5 | attrs: "F_name", "level" 6 | bools: "==" 7 | loc: 3 8 | 9 | # 5.1.1 optimal solution 10 | 11 | inner_join(class,enroll) %>% inner_join(faculty) %>% inner_join(student) %>% 12 | filter (F_name == "faculty1" & level == "JR") %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/30.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/5-1.txt, tests-examples/cp19/tables/5-2.txt 2 | output: tests-examples/cp19/tables/5.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 6 8 | 9 | # 5.1.5 optimal solution 10 | 11 | inner_join(class,faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter(n == max(n)) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/cp19/307.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/employees.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/52.out 3 | const: "10000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 1 8 | 9 | # 5.3.1 modified optimal solution sql 10 | 11 | inner_join(employees, 12 | anti_join( 13 | filter(employees, salary > 10000), 14 | inner_join(certified, aircraft))) %>% select(eid) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/308.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/employees.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/52.out 3 | const: "10000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 2 8 | 9 | # 5.3.1 modified optimal solution sql 10 | 11 | inner_join(employees, 12 | anti_join( 13 | filter(employees, salary > 10000), 14 | inner_join(certified, aircraft))) %>% select(eid) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/309.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/employees.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/52.out 3 | const: "10000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 3 8 | 9 | # 5.3.1 modified optimal solution sql 10 | 11 | inner_join(employees, 12 | anti_join( 13 | filter(employees, salary > 10000), 14 | inner_join(certified, aircraft))) %>% select(eid) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/31.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/6-1.txt, tests-examples/cp19/tables/6-2.txt, tests-examples/cp19/tables/6-3.txt 2 | output: tests-examples/cp19/tables/6.out 3 | const: "5" 4 | aggrs: "n" 5 | attrs: 6 | bools: "<=" 7 | loc: 1 8 | 9 | # 5.1.6 optimal solution 10 | 11 | inner_join(class, enroll) %>% inner_join(faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter (n <= 5) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/cp19/310.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/employees.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/52.out 3 | const: "10000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 4 8 | 9 | # 5.3.1 modified optimal solution sql 10 | 11 | inner_join(employees, 12 | anti_join( 13 | filter(employees, salary > 10000), 14 | inner_join(certified, aircraft))) %>% select(eid) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/311.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/employees.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/52.out 3 | const: "10000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 5 8 | 9 | # 5.3.1 modified optimal solution sql 10 | 11 | inner_join(employees, 12 | anti_join( 13 | filter(employees, salary > 10000), 14 | inner_join(certified, aircraft))) %>% select(eid) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/312.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/employees.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/52.out 3 | const: "10000" 4 | aggrs: 5 | attrs: "salary" 6 | bools: 7 | loc: 6 8 | 9 | # 5.3.1 modified optimal solution sql 10 | 11 | inner_join(employees, 12 | anti_join( 13 | filter(employees, salary > 10000), 14 | inner_join(certified, aircraft))) %>% select(eid) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/cp19/319.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/54.out 3 | const: "3" 4 | aggrs: "n" 5 | attrs: 6 | bools: ">" 7 | loc: 1 8 | 9 | # 5.3.2 optimal solution sql 10 | 11 | out <- inner_join( 12 | inner_join(certified, aircraft), 13 | certified %>% group_by(eid) %>% summarise(n = n()) %>% 14 | filter(n < 3)) %>% select(eid) %>% distinct() 15 | -------------------------------------------------------------------------------- /tests-examples/cp19/32.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/6-1.txt, tests-examples/cp19/tables/6-2.txt, tests-examples/cp19/tables/6-3.txt 2 | output: tests-examples/cp19/tables/6.out 3 | const: "5" 4 | aggrs: "n" 5 | attrs: 6 | bools: "<=" 7 | loc: 2 8 | 9 | # 5.1.6 optimal solution 10 | 11 | inner_join(class, enroll) %>% inner_join(faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter (n <= 5) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/cp19/320.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/54.out 3 | const: "3" 4 | aggrs: "n" 5 | attrs: 6 | bools: ">" 7 | loc: 2 8 | 9 | # 5.3.2 optimal solution sql 10 | 11 | out <- inner_join( 12 | inner_join(certified, aircraft), 13 | certified %>% group_by(eid) %>% summarise(n = n()) %>% 14 | filter(n < 3)) %>% select(eid) %>% distinct() 15 | -------------------------------------------------------------------------------- /tests-examples/cp19/321.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/54.out 3 | const: "3" 4 | aggrs: "n" 5 | attrs: 6 | bools: ">" 7 | loc: 3 8 | 9 | # 5.3.2 optimal solution sql 10 | 11 | out <- inner_join( 12 | inner_join(certified, aircraft), 13 | certified %>% group_by(eid) %>% summarise(n = n()) %>% 14 | filter(n < 3)) %>% select(eid) %>% distinct() 15 | -------------------------------------------------------------------------------- /tests-examples/cp19/322.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/54.out 3 | const: "3" 4 | aggrs: "n" 5 | attrs: 6 | bools: ">" 7 | loc: 4 8 | 9 | # 5.3.2 optimal solution sql 10 | 11 | out <- inner_join( 12 | inner_join(certified, aircraft), 13 | certified %>% group_by(eid) %>% summarise(n = n()) %>% 14 | filter(n < 3)) %>% select(eid) %>% distinct() 15 | -------------------------------------------------------------------------------- /tests-examples/cp19/323.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/54.out 3 | const: "3" 4 | aggrs: "n" 5 | attrs: 6 | bools: ">" 7 | loc: 5 8 | 9 | # 5.3.2 optimal solution sql 10 | 11 | out <- inner_join( 12 | inner_join(certified, aircraft), 13 | certified %>% group_by(eid) %>% summarise(n = n()) %>% 14 | filter(n < 3)) %>% select(eid) %>% distinct() 15 | -------------------------------------------------------------------------------- /tests-examples/cp19/324.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/aircraft.txt, tests-examples/cp19/tables/certified.txt 2 | output: tests-examples/cp19/tables/54.out 3 | const: "3" 4 | aggrs: "n" 5 | attrs: 6 | bools: ">" 7 | loc: 6 8 | 9 | # 5.3.2 optimal solution sql 10 | 11 | out <- inner_join( 12 | inner_join(certified, aircraft), 13 | certified %>% group_by(eid) %>% summarise(n = n()) %>% 14 | filter(n < 3)) %>% select(eid) %>% distinct() 15 | -------------------------------------------------------------------------------- /tests-examples/cp19/33.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/6-1.txt, tests-examples/cp19/tables/6-2.txt, tests-examples/cp19/tables/6-3.txt 2 | output: tests-examples/cp19/tables/6.out 3 | const: "5" 4 | aggrs: "n" 5 | attrs: 6 | bools: "<=" 7 | loc: 3 8 | 9 | # 5.1.6 optimal solution 10 | 11 | inner_join(class, enroll) %>% inner_join(faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter (n <= 5) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/cp19/34.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/6-1.txt, tests-examples/cp19/tables/6-2.txt, tests-examples/cp19/tables/6-3.txt 2 | output: tests-examples/cp19/tables/6.out 3 | const: "5" 4 | aggrs: "n" 5 | attrs: 6 | bools: "<=" 7 | loc: 4 8 | 9 | # 5.1.6 optimal solution 10 | 11 | inner_join(class, enroll) %>% inner_join(faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter (n <= 5) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/cp19/35.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/6-1.txt, tests-examples/cp19/tables/6-2.txt, tests-examples/cp19/tables/6-3.txt 2 | output: tests-examples/cp19/tables/6.out 3 | const: "5" 4 | aggrs: "n" 5 | attrs: 6 | bools: "<=" 7 | loc: 5 8 | 9 | # 5.1.6 optimal solution 10 | 11 | inner_join(class, enroll) %>% inner_join(faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter (n <= 5) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/cp19/36.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/6-1.txt, tests-examples/cp19/tables/6-2.txt, tests-examples/cp19/tables/6-3.txt 2 | output: tests-examples/cp19/tables/6.out 3 | const: "5" 4 | aggrs: "n" 5 | attrs: 6 | bools: "<=" 7 | loc: 6 8 | 9 | # 5.1.6 optimal solution 10 | 11 | inner_join(class, enroll) %>% inner_join(faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter (n <= 5) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/cp19/37.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/7-1.txt 2 | output: tests-examples/cp19/tables/7.out 3 | const: 4 | aggrs: "mean" 5 | attrs: "age" 6 | bools: 7 | loc: 1 8 | 9 | # 5.1.7 optimal solution 10 | 11 | student %>% group_by(level) %>% summarise(average=mean(age)) -------------------------------------------------------------------------------- /tests-examples/cp19/38.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/7-1.txt 2 | output: tests-examples/cp19/tables/7.out 3 | const: 4 | aggrs: "mean" 5 | attrs: "age" 6 | bools: 7 | loc: 2 8 | 9 | # 5.1.7 optimal solution 10 | 11 | student %>% group_by(level) %>% summarise(average=mean(age)) -------------------------------------------------------------------------------- /tests-examples/cp19/39.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/7-1.txt 2 | output: tests-examples/cp19/tables/7.out 3 | const: 4 | aggrs: "mean" 5 | attrs: "age" 6 | bools: 7 | loc: 3 8 | 9 | # 5.1.7 optimal solution 10 | 11 | student %>% group_by(level) %>% summarise(average=mean(age)) -------------------------------------------------------------------------------- /tests-examples/cp19/4.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/1-1.txt, tests-examples/cp19/tables/1-2.txt, tests-examples/cp19/tables/1-3.txt, tests-examples/cp19/tables/1-4.txt 2 | output: tests-examples/cp19/tables/1.out 3 | const: "faculty1", "JR" 4 | aggrs: 5 | attrs: "F_name", "level" 6 | bools: "==" 7 | loc: 4 8 | 9 | # 5.1.1 optimal solution 10 | 11 | inner_join(class,enroll) %>% inner_join(faculty) %>% inner_join(student) %>% 12 | filter (F_name == "faculty1" & level == "JR") %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/40.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/7-1.txt 2 | output: tests-examples/cp19/tables/7.out 3 | const: 4 | aggrs: "mean" 5 | attrs: "age" 6 | bools: 7 | loc: 4 8 | 9 | # 5.1.7 optimal solution 10 | 11 | student %>% group_by(level) %>% summarise(average=mean(age)) -------------------------------------------------------------------------------- /tests-examples/cp19/41.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/7-1.txt 2 | output: tests-examples/cp19/tables/7.out 3 | const: 4 | aggrs: "mean" 5 | attrs: "age" 6 | bools: 7 | loc: 5 8 | 9 | # 5.1.7 optimal solution 10 | 11 | student %>% group_by(level) %>% summarise(average=mean(age)) -------------------------------------------------------------------------------- /tests-examples/cp19/42.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/7-1.txt 2 | output: tests-examples/cp19/tables/7.out 3 | const: 4 | aggrs: "mean" 5 | attrs: "age" 6 | bools: 7 | loc: 6 8 | 9 | # 5.1.7 optimal solution 10 | 11 | student %>% group_by(level) %>% summarise(average=mean(age)) -------------------------------------------------------------------------------- /tests-examples/cp19/43.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/8-1.txt 2 | output: tests-examples/cp19/tables/8.out 3 | const: "JR" 4 | aggrs: "mean" 5 | attrs: "level", "age" 6 | bools: "!=" 7 | loc: 1 8 | 9 | # 5.1.8 optimal solution 10 | 11 | student %>% group_by(level) %>% summarize(average=mean(age)) %>% 12 | filter(level != "JR") -------------------------------------------------------------------------------- /tests-examples/cp19/44.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/8-1.txt 2 | output: tests-examples/cp19/tables/8.out 3 | const: "JR" 4 | aggrs: "mean" 5 | attrs: "level", "age" 6 | bools: "!=" 7 | loc: 2 8 | 9 | # 5.1.8 optimal solution 10 | 11 | student %>% group_by(level) %>% summarize(average=mean(age)) %>% 12 | filter(level != "JR") -------------------------------------------------------------------------------- /tests-examples/cp19/45.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/8-1.txt 2 | output: tests-examples/cp19/tables/8.out 3 | const: "JR" 4 | aggrs: "mean" 5 | attrs: "level", "age" 6 | bools: "!=" 7 | loc: 3 8 | 9 | # 5.1.8 optimal solution 10 | 11 | student %>% group_by(level) %>% summarize(average=mean(age)) %>% 12 | filter(level != "JR") -------------------------------------------------------------------------------- /tests-examples/cp19/46.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/8-1.txt 2 | output: tests-examples/cp19/tables/8.out 3 | const: "JR" 4 | aggrs: "mean" 5 | attrs: "level", "age" 6 | bools: "!=" 7 | loc: 4 8 | 9 | # 5.1.8 optimal solution 10 | 11 | student %>% group_by(level) %>% summarize(average=mean(age)) %>% 12 | filter(level != "JR") -------------------------------------------------------------------------------- /tests-examples/cp19/47.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/8-1.txt 2 | output: tests-examples/cp19/tables/8.out 3 | const: "JR" 4 | aggrs: "mean" 5 | attrs: "level", "age" 6 | bools: "!=" 7 | loc: 5 8 | 9 | # 5.1.8 optimal solution 10 | 11 | student %>% group_by(level) %>% summarize(average=mean(age)) %>% 12 | filter(level != "JR") -------------------------------------------------------------------------------- /tests-examples/cp19/48.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/8-1.txt 2 | output: tests-examples/cp19/tables/8.out 3 | const: "JR" 4 | aggrs: "mean" 5 | attrs: "level", "age" 6 | bools: "!=" 7 | loc: 6 8 | 9 | # 5.1.8 optimal solution 10 | 11 | student %>% group_by(level) %>% summarize(average=mean(age)) %>% 12 | filter(level != "JR") -------------------------------------------------------------------------------- /tests-examples/cp19/5.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/1-1.txt, tests-examples/cp19/tables/1-2.txt, tests-examples/cp19/tables/1-3.txt, tests-examples/cp19/tables/1-4.txt 2 | output: tests-examples/cp19/tables/1.out 3 | const: "faculty1", "JR" 4 | aggrs: 5 | attrs: "F_name", "level" 6 | bools: "==" 7 | loc: 5 8 | 9 | # 5.1.1 optimal solution 10 | 11 | inner_join(class,enroll) %>% inner_join(faculty) %>% inner_join(student) %>% 12 | filter (F_name == "faculty1" & level == "JR") %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/55.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/10-1.txt, tests-examples/cp19/tables/10-2.txt 2 | output: tests-examples/cp19/tables/10.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 1 8 | 9 | # 5.1.10 optimal solution 10 | 11 | inner_join(student,enrolled) %>% 12 | group_by(sname) %>% summarise (n = n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/56.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/10-1.txt, tests-examples/cp19/tables/10-2.txt 2 | output: tests-examples/cp19/tables/10.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 2 8 | 9 | # 5.1.10 optimal solution 10 | 11 | inner_join(student,enrolled) %>% 12 | group_by(sname) %>% summarise (n = n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/57.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/10-1.txt, tests-examples/cp19/tables/10-2.txt 2 | output: tests-examples/cp19/tables/10.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 3 8 | 9 | # 5.1.10 optimal solution 10 | 11 | inner_join(student,enrolled) %>% 12 | group_by(sname) %>% summarise (n = n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/58.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/10-1.txt, tests-examples/cp19/tables/10-2.txt 2 | output: tests-examples/cp19/tables/10.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 4 8 | 9 | # 5.1.10 optimal solution 10 | 11 | inner_join(student,enrolled) %>% 12 | group_by(sname) %>% summarise (n = n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/59.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/10-1.txt, tests-examples/cp19/tables/10-2.txt 2 | output: tests-examples/cp19/tables/10.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 5 8 | 9 | # 5.1.10 optimal solution 10 | 11 | inner_join(student,enrolled) %>% 12 | group_by(sname) %>% summarise (n = n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/6.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/1-1.txt, tests-examples/cp19/tables/1-2.txt, tests-examples/cp19/tables/1-3.txt, tests-examples/cp19/tables/1-4.txt 2 | output: tests-examples/cp19/tables/1.out 3 | const: "faculty1", "JR" 4 | aggrs: 5 | attrs: "F_name", "level" 6 | bools: "==" 7 | loc: 6 8 | 9 | # 5.1.1 optimal solution 10 | 11 | inner_join(class,enroll) %>% inner_join(faculty) %>% inner_join(student) %>% 12 | filter (F_name == "faculty1" & level == "JR") %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/60.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/10-1.txt, tests-examples/cp19/tables/10-2.txt 2 | output: tests-examples/cp19/tables/10.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 6 8 | 9 | # 5.1.10 optimal solution 10 | 11 | inner_join(student,enrolled) %>% 12 | group_by(sname) %>% summarise (n = n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/61.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/11-1.txt, tests-examples/cp19/tables/11-2.txt 2 | output: tests-examples/cp19/tables/11.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 1 8 | 9 | # 5.1.11 optimal solution 10 | 11 | anti_join(student,enrolled) %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/62.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/11-1.txt, tests-examples/cp19/tables/11-2.txt 2 | output: tests-examples/cp19/tables/11.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 2 8 | 9 | # 5.1.11 optimal solution 10 | 11 | anti_join(student,enrolled) %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/63.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/11-1.txt, tests-examples/cp19/tables/11-2.txt 2 | output: tests-examples/cp19/tables/11.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 3 8 | 9 | # 5.1.11 optimal solution 10 | 11 | anti_join(student,enrolled) %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/64.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/11-1.txt, tests-examples/cp19/tables/11-2.txt 2 | output: tests-examples/cp19/tables/11.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 4 8 | 9 | # 5.1.11 optimal solution 10 | 11 | anti_join(student,enrolled) %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/65.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/11-1.txt, tests-examples/cp19/tables/11-2.txt 2 | output: tests-examples/cp19/tables/11.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 5 8 | 9 | # 5.1.11 optimal solution 10 | 11 | anti_join(student,enrolled) %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/66.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/11-1.txt, tests-examples/cp19/tables/11-2.txt 2 | output: tests-examples/cp19/tables/11.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 6 8 | 9 | # 5.1.11 optimal solution 10 | 11 | anti_join(student,enrolled) %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/cp19/67.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/12-1.txt 2 | output: tests-examples/cp19/tables/12.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 1 8 | 9 | # 5.1.12 optimal solution 10 | 11 | student %>% group_by(age,level) %>% summarise(n = n()) %>% 12 | filter(n==max(n)) %>% select(-n) -------------------------------------------------------------------------------- /tests-examples/cp19/68.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/12-1.txt 2 | output: tests-examples/cp19/tables/12.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 2 8 | 9 | # 5.1.12 optimal solution 10 | 11 | student %>% group_by(age,level) %>% summarise(n = n()) %>% 12 | filter(n==max(n)) %>% select(-n) -------------------------------------------------------------------------------- /tests-examples/cp19/69.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/12-1.txt 2 | output: tests-examples/cp19/tables/12.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 3 8 | 9 | # 5.1.12 optimal solution 10 | 11 | student %>% group_by(age,level) %>% summarise(n = n()) %>% 12 | filter(n==max(n)) %>% select(-n) -------------------------------------------------------------------------------- /tests-examples/cp19/70.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/12-1.txt 2 | output: tests-examples/cp19/tables/12.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 4 8 | 9 | # 5.1.12 optimal solution 10 | 11 | student %>% group_by(age,level) %>% summarise(n = n()) %>% 12 | filter(n==max(n)) %>% select(-n) -------------------------------------------------------------------------------- /tests-examples/cp19/71.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/12-1.txt 2 | output: tests-examples/cp19/tables/12.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 5 8 | 9 | # 5.1.12 optimal solution 10 | 11 | student %>% group_by(age,level) %>% summarise(n = n()) %>% 12 | filter(n==max(n)) %>% select(-n) -------------------------------------------------------------------------------- /tests-examples/cp19/72.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/12-1.txt 2 | output: tests-examples/cp19/tables/12.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 6 8 | 9 | # 5.1.12 optimal solution 10 | 11 | student %>% group_by(age,level) %>% summarise(n = n()) %>% 12 | filter(n==max(n)) %>% select(-n) -------------------------------------------------------------------------------- /tests-examples/cp19/73.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/13-1.txt, tests-examples/cp19/tables/13-2.txt 2 | output: tests-examples/cp19/tables/13.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 1 8 | 9 | # 5.2.1 optimal solution 10 | 11 | inner_join(parts,catalog) %>% select(part_name) -------------------------------------------------------------------------------- /tests-examples/cp19/74.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/13-1.txt, tests-examples/cp19/tables/13-2.txt 2 | output: tests-examples/cp19/tables/13.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 2 8 | 9 | # 5.2.1 optimal solution 10 | 11 | inner_join(parts,catalog) %>% select(part_name) -------------------------------------------------------------------------------- /tests-examples/cp19/75.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/13-1.txt, tests-examples/cp19/tables/13-2.txt 2 | output: tests-examples/cp19/tables/13.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 3 8 | 9 | # 5.2.1 optimal solution 10 | 11 | inner_join(parts,catalog) %>% select(part_name) -------------------------------------------------------------------------------- /tests-examples/cp19/76.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/13-1.txt, tests-examples/cp19/tables/13-2.txt 2 | output: tests-examples/cp19/tables/13.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 4 8 | 9 | # 5.2.1 optimal solution 10 | 11 | inner_join(parts,catalog) %>% select(part_name) -------------------------------------------------------------------------------- /tests-examples/cp19/77.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/13-1.txt, tests-examples/cp19/tables/13-2.txt 2 | output: tests-examples/cp19/tables/13.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 5 8 | 9 | # 5.2.1 optimal solution 10 | 11 | inner_join(parts,catalog) %>% select(part_name) -------------------------------------------------------------------------------- /tests-examples/cp19/78.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/13-1.txt, tests-examples/cp19/tables/13-2.txt 2 | output: tests-examples/cp19/tables/13.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 6 8 | 9 | # 5.2.1 optimal solution 10 | 11 | inner_join(parts,catalog) %>% select(part_name) -------------------------------------------------------------------------------- /tests-examples/cp19/79.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/14-1.txt, tests-examples/cp19/tables/14-2.txt, tests-examples/cp19/tables/14-3.txt 2 | output: tests-examples/cp19/tables/14.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 1 8 | 9 | # 5.2.2 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | group_by(sname) %>% summarise(n=n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/80.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/14-1.txt, tests-examples/cp19/tables/14-2.txt, tests-examples/cp19/tables/14-3.txt 2 | output: tests-examples/cp19/tables/14.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 2 8 | 9 | # 5.2.2 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | group_by(sname) %>% summarise(n=n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/81.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/14-1.txt, tests-examples/cp19/tables/14-2.txt, tests-examples/cp19/tables/14-3.txt 2 | output: tests-examples/cp19/tables/14.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 3 8 | 9 | # 5.2.2 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | group_by(sname) %>% summarise(n=n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/82.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/14-1.txt, tests-examples/cp19/tables/14-2.txt, tests-examples/cp19/tables/14-3.txt 2 | output: tests-examples/cp19/tables/14.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 4 8 | 9 | # 5.2.2 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | group_by(sname) %>% summarise(n=n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/83.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/14-1.txt, tests-examples/cp19/tables/14-2.txt, tests-examples/cp19/tables/14-3.txt 2 | output: tests-examples/cp19/tables/14.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 5 8 | 9 | # 5.2.2 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | group_by(sname) %>% summarise(n=n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/84.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/14-1.txt, tests-examples/cp19/tables/14-2.txt, tests-examples/cp19/tables/14-3.txt 2 | output: tests-examples/cp19/tables/14.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 6 8 | 9 | # 5.2.2 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | group_by(sname) %>% summarise(n=n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/85.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/15-1.txt, tests-examples/cp19/tables/15-2.txt, tests-examples/cp19/tables/15-3.txt 2 | output: tests-examples/cp19/tables/15.out 3 | const: "red" 4 | aggrs: "n", "max(n)" 5 | attrs: "n", "color" 6 | bools: "==" 7 | loc: 1 8 | 9 | # 5.2.3 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | group_by(sname,color) %>% summarise(n=n()) %>% 13 | ungroup() %>% filter(color == "red" & n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/86.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/15-1.txt, tests-examples/cp19/tables/15-2.txt, tests-examples/cp19/tables/15-3.txt 2 | output: tests-examples/cp19/tables/15.out 3 | const: "red" 4 | aggrs: "n", "max(n)" 5 | attrs: "n", "color" 6 | bools: "==" 7 | loc: 2 8 | 9 | # 5.2.3 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | group_by(sname,color) %>% summarise(n=n()) %>% 13 | ungroup() %>% filter(color == "red" & n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/87.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/15-1.txt, tests-examples/cp19/tables/15-2.txt, tests-examples/cp19/tables/15-3.txt 2 | output: tests-examples/cp19/tables/15.out 3 | const: "red" 4 | aggrs: "n", "max(n)" 5 | attrs: "n", "color" 6 | bools: "==" 7 | loc: 3 8 | 9 | # 5.2.3 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | group_by(sname,color) %>% summarise(n=n()) %>% 13 | ungroup() %>% filter(color == "red" & n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/88.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/15-1.txt, tests-examples/cp19/tables/15-2.txt, tests-examples/cp19/tables/15-3.txt 2 | output: tests-examples/cp19/tables/15.out 3 | const: "red" 4 | aggrs: "n", "max(n)" 5 | attrs: "n", "color" 6 | bools: "==" 7 | loc: 4 8 | 9 | # 5.2.3 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | group_by(sname,color) %>% summarise(n=n()) %>% 13 | ungroup() %>% filter(color == "red" & n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/89.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/15-1.txt, tests-examples/cp19/tables/15-2.txt, tests-examples/cp19/tables/15-3.txt 2 | output: tests-examples/cp19/tables/15.out 3 | const: "red" 4 | aggrs: "n", "max(n)" 5 | attrs: "n", "color" 6 | bools: "==" 7 | loc: 5 8 | 9 | # 5.2.3 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | group_by(sname,color) %>% summarise(n=n()) %>% 13 | ungroup() %>% filter(color == "red" & n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/90.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/cp19/tables/15-1.txt, tests-examples/cp19/tables/15-2.txt, tests-examples/cp19/tables/15-3.txt 2 | output: tests-examples/cp19/tables/15.out 3 | const: "red" 4 | aggrs: "n", "max(n)" 5 | attrs: "n", "color" 6 | bools: "==" 7 | loc: 6 8 | 9 | # 5.2.3 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | group_by(sname,color) %>% summarise(n=n()) %>% 13 | ungroup() %>% filter(color == "red" & n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/cp19/tables/1-1.txt: -------------------------------------------------------------------------------- 1 | C_name,F_key 2 | class1,f1 3 | class2,f2 4 | class3,f1 5 | class4,f3 6 | class5,f4 7 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/1-2.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class1 3 | S2,class1 4 | S3,class2 5 | S3,class5 6 | S4,class2 7 | S4,class4 8 | S5,class3 9 | S6,class3 10 | S6,class2 11 | S7,class5 12 | S8,class4 13 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/1-3.txt: -------------------------------------------------------------------------------- 1 | F_key,F_name 2 | f1,faculty1 3 | f2,faculty2 4 | f3,faculty3 5 | f4,faculty4 6 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/1-4.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name,level 2 | S1,stu1,JR 3 | S2,stu2,SR 4 | S3,stu3,JR 5 | S4,stu4,SR 6 | S5,stu5,JR 7 | S6,stu6,SR 8 | S7,stu7,JR 9 | S8,stu8,JR 10 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/1.out: -------------------------------------------------------------------------------- 1 | S_name 2 | stu1 3 | stu5 4 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/10-1.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class1 3 | S1,class2 4 | S2,class1 5 | S2,class2 6 | S2,class3 7 | S3,class1 8 | S4,class3 9 | S4,class2 10 | S5,class1 11 | S5,class2 12 | S5,class4 13 | S6,class3 14 | S6,class4 15 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/10-2.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,stu1 3 | S2,stu2 4 | S3,stu3 5 | S4,stu4 6 | S5,stu5 7 | S6,stu6 8 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/10.out: -------------------------------------------------------------------------------- 1 | S_name 2 | stu2 3 | stu5 4 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/11-1.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | S6,SN6 8 | S7,SN7 9 | S8,SN8 10 | S9,SN9 11 | S10,SN10 12 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/11-2.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class2 3 | S2,class1 4 | S4,class2 5 | S4,class4 6 | S5,class4 7 | S7,class5 8 | S7,class1 9 | S8,class4 10 | S10,class5 11 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/11.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN3 3 | SN6 4 | SN9 5 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/12-1.txt: -------------------------------------------------------------------------------- 1 | S_key,age,level 2 | S1,19,SO 3 | S2,19,JR 4 | S3,19,JR 5 | S4,20,SO 6 | S5,20,JR 7 | S6,20,SO 8 | S7,21,SO 9 | S8,21,SO 10 | S9,21,SR 11 | S10,22,SR 12 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/12.out: -------------------------------------------------------------------------------- 1 | age,level 2 | 19,JR 3 | 20,SO 4 | 21,SO 5 | 22,SR 6 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/13-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P4 4 | S2,P2 5 | S2,P3 6 | S3,P5 7 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/13-2.txt: -------------------------------------------------------------------------------- 1 | P_id,P_name 2 | P1,PN1 3 | P2,PN2 4 | P3,PN3 5 | P4,PN4 6 | P5,PN5 7 | P6,PN6 8 | P7,PN7 9 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/13.out: -------------------------------------------------------------------------------- 1 | P_name 2 | PN1 3 | PN2 4 | PN3 5 | PN4 6 | PN5 7 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/14-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P2 4 | S2,P1 5 | S2,P2 6 | S2,P3 7 | S3,P3 8 | S4,P2 9 | S5,P1 10 | S5,P2 11 | S5,P3 12 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/14-2.txt: -------------------------------------------------------------------------------- 1 | P_id,color 2 | P1,red 3 | P2,green 4 | P3,yellow 5 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/14-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/14.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN2 3 | SN5 4 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/15-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P4 4 | S2,P1 5 | S2,P3 6 | S3,P1 7 | S4,P4 8 | S5,P4 9 | S5,P2 10 | S5,P1 11 | S6,P5 12 | S7,P6 13 | S8,P4 14 | S8,P1 15 | S8,P6 16 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/15-2.txt: -------------------------------------------------------------------------------- 1 | P_id,color 2 | P1,red 3 | P2,green 4 | P3,yellow 5 | P4,red 6 | P5,green 7 | P6,yellow 8 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/15-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | S6,SN6 8 | S7,SN7 9 | S8,SN8 10 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/15.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN5 4 | SN8 5 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/16-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S2,P1 4 | S1,P2 5 | S2,P2 6 | S3,P2 7 | S3,P3 8 | S1,P4 9 | S3,P3 10 | S2,P5 11 | S3,P5 12 | S3,P6 13 | S1,P7 14 | S2,P8 15 | S4,P9 16 | S3,P9 17 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/16-2.txt: -------------------------------------------------------------------------------- 1 | P_id,P_name 2 | P1,PN1 3 | P2,PN2 4 | P3,PN3 5 | P4,PN4 6 | P5,PN5 7 | P6,PN6 8 | P7,PN7 9 | P8,PN8 10 | P9,PN9 11 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/16-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,AWS 5 | S4,AWS 6 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/16.out: -------------------------------------------------------------------------------- 1 | P_name 2 | PN3 3 | PN6 4 | PN9 5 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/17-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id,cost 2 | S1,P1,4 3 | S2,P1,2 4 | S1,P2,4 5 | S2,P2,2 6 | S3,P2,3 7 | S3,P3,4 8 | S1,P4,2 9 | S4,P3,6 10 | S2,P5,4 11 | S3,P5,2 12 | S3,P6,4 13 | S1,P7,2 14 | S2,P8,4 15 | S4,P9,4 16 | S3,P9,6 17 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/17-2.txt: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN1 3 | P2,SN1 4 | P3,SN4 5 | P5,SN2 6 | P9,SN3 7 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/17-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/17.out: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN1 3 | P2,SN1 4 | P3,SN4 5 | P5,SN2 6 | P9,SN3 7 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/18-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id,cost 2 | S1,P1,1 3 | S2,P1,2 4 | S1,P2,3 5 | S2,P2,2 6 | S3,P2,2 7 | S3,P3,4 8 | S1,P4,2 9 | S4,P3,5 10 | S2,P5,1 11 | S3,P5,2 12 | S3,P6,3 13 | S1,P7,2 14 | S2,P8,4 15 | S4,P9,4 16 | S3,P9,5 17 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/18-2.txt: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN1 3 | P2,SN1 4 | P3,SN4 5 | P5,SN2 6 | P9,SN3 7 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/18-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/18.out: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN2 3 | P2,SN1 4 | P4,SN1 5 | P3,SN4 6 | P5,SN3 7 | P6,SN3 8 | P7,SN1 9 | P8,SN2 10 | P9,SN3 11 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/19-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P4 4 | S2,P1 5 | S2,P3 6 | S3,P1 7 | S4,P4 8 | S5,P4 9 | S5,P2 10 | S6,P5 11 | S7,P6 12 | S8,P4 13 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/19-2.txt: -------------------------------------------------------------------------------- 1 | P_id,color 2 | P1,red 3 | P2,green 4 | P3,yellow 5 | P4,red 6 | P5,green 7 | P6,yellow 8 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/19-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | S6,SN6 8 | S7,SN7 9 | S8,SN8 10 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/19.out: -------------------------------------------------------------------------------- 1 | S_key,P_id,S_name,color 2 | S1,P1,SN1,red 3 | S1,P4,SN1,red 4 | S2,P1,SN2,red 5 | S3,P1,SN3,red 6 | S4,P4,SN4,red 7 | S5,P4,SN5,red 8 | S8,P4,SN8,red 9 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/2-1.txt: -------------------------------------------------------------------------------- 1 | C_name,F_key 2 | class1,f1 3 | class2,f2 4 | class3,f1 5 | class4,f3 6 | class5,f4 7 | class6,f1 8 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/2-2.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class2 3 | S2,class1 4 | S3,class2 5 | S3,class5 6 | S4,class2 7 | S4,class4 8 | S5,class4 9 | S6,class3 10 | S6,class2 11 | S7,class5 12 | S7,class1 13 | S8,class4 14 | S9,class5 15 | S9,class2 16 | S10,class5 17 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/2-3.txt: -------------------------------------------------------------------------------- 1 | F_key,F_name 2 | f1,faculty1 3 | f2,faculty2 4 | f3,faculty3 5 | f4,faculty4 6 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/2-4.txt: -------------------------------------------------------------------------------- 1 | S_key,major,age 2 | S1,History,20 3 | S2,Computer,21 4 | S3,Computer,23 5 | S4,Math,18 6 | S5,History,22 7 | S6,Math,22 8 | S7,English,21 9 | S8,English,23 10 | S9,History,21 11 | S10,History,22 12 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/2.out: -------------------------------------------------------------------------------- 1 | maxage 2 | 22 3 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/20.out: -------------------------------------------------------------------------------- 1 | S_key,P_id,S_name,color 2 | 1,S1,P1,SN1,red 3 | 2,S1,P4,SN1,red 4 | 3,S2,P1,SN2,red 5 | 4,S3,P1,SN3,red 6 | 5,S4,P4,SN4,red 7 | 6,S5,P4,SN5,red 8 | 7,S8,P4,SN8,red 9 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/21-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P4 4 | S2,P2 5 | S2,P3 6 | S3,P5 7 | S4,P3 8 | S4,P6 9 | S5,P4 10 | S5,P2 11 | S6,P4 12 | S7,P6 13 | S8,P5 14 | S8,P2 15 | S9,P1 16 | S10,P6 17 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/21-2.txt: -------------------------------------------------------------------------------- 1 | P_id,color 2 | P1,red 3 | P2,green 4 | P3,yellow 5 | P4,red 6 | P5,green 7 | P6,blue 8 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/21-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | S6,SN6 8 | S7,SN7 9 | S8,SN8 10 | S9,SN9 11 | S10,SN10 12 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/21.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN9 4 | SN2 5 | SN5 6 | SN8 7 | SN6 8 | SN3 9 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/22.out: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN1 3 | P2,SN1 4 | P2,SN3 5 | P3,SN4 6 | P5,SN2 7 | P9,SN3 8 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/24.out: -------------------------------------------------------------------------------- 1 | aname 2 | Boeing 747-400 3 | Boeing 737-800 4 | Airbus A340-300 5 | British Aerospace Jetstream 41 6 | Embraer ERJ-145 7 | SAAB 340 8 | Piper Archer III 9 | Tupolev 154 10 | Lockheed L1011 11 | Boeing 757-300 12 | Boeing 777-300 13 | Boeing 767-400ER 14 | Airbus A320 15 | Airbus A319 16 | Boeing 727 17 | 18 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/25.out: -------------------------------------------------------------------------------- 1 | eid 2 | 142519864 3 | 269734834 4 | 567354612 5 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/26.out: -------------------------------------------------------------------------------- 1 | ename 2 | Karen Scott 3 | Mark Young 4 | Lisa Walker 5 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/27.out: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN1 3 | P2,SN1 4 | P2,SN1 5 | P3,SN4 6 | P5,SN2 7 | P9,SN3 8 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/28.out: -------------------------------------------------------------------------------- 1 | aname 2 | Piper Archer III 3 | Boeing 757-300 4 | Boeing 767-400ER 5 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/3-1.txt: -------------------------------------------------------------------------------- 1 | ID_key,Room 2 | C1,R102 3 | C2,R120 4 | C3,R128 5 | C4,R127 6 | C5,R131 7 | C6,R128 8 | C7,R130 9 | C8,R130 10 | C9,R128 11 | C10,R102 12 | C11,R120 13 | C12,R131 14 | C13,R127 15 | C14,R131 16 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/3-2.txt: -------------------------------------------------------------------------------- 1 | ID_key_student,ID_key 2 | S1,C1 3 | S1,C2 4 | S2,C1 5 | S2,C3 6 | S2,C4 7 | S3,C2 8 | S3,C4 9 | S4,C1 10 | S4,C5 11 | S5,C5 12 | S6,C1 13 | S6,C5 14 | S7,C2 15 | S7,C3 16 | S7,C5 17 | S8,C1 18 | S9,C5 19 | S10,C5 20 | S10,C6 21 | S9,C7 22 | S8,C8 23 | S8,C9 24 | S10,C10 25 | S1,C11 26 | S2,C11 27 | S3,C11 28 | S4,C11 29 | S5,C11 30 | S7,C12 31 | S8,C12 32 | S7,C13 33 | S1,C13 34 | S2,C13 35 | S4,C13 36 | S9,C14 37 | S10,C14 38 | S5,C14 39 | S6,C14 40 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/3.out: -------------------------------------------------------------------------------- 1 | ID_key 2 | C1 3 | C11 4 | C3 5 | C5 6 | C6 7 | C9 8 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/30.out: -------------------------------------------------------------------------------- 1 | P_id,n 2 | P4,1 3 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/31.out: -------------------------------------------------------------------------------- 1 | S_key,P_id,S_name,color 2 | S5,P2,SN5,green 3 | S6,P5,SN6,green 4 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/32.out: -------------------------------------------------------------------------------- 1 | P_id,n 2 | P2,1 3 | P5,1 4 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/33.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN2 3 | SN5 4 | SN8 5 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/34.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN5 4 | SN6 5 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/35.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN2 4 | SN3 5 | SN4 6 | SN8 7 | SN9 8 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/36.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN9 4 | SN5 5 | SN6 6 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/37.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN2 4 | SN3 5 | SN4 6 | SN5 7 | SN6 8 | SN7 9 | SN8 10 | SN9 11 | SN10 12 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/38.out: -------------------------------------------------------------------------------- 1 | eid,n,maxcrusingrange 2 | 11564812,2,4010 3 | 90873519,1,2128 4 | 141582651,3,6475 5 | 142519864,8,8430 6 | 159542516,2,1530 7 | 242518965,2,4010 8 | 269734834,15,8430 9 | 274878974,2,6475 10 | 310454876,2,6900 11 | 355548984,2,6900 12 | 356187925,1,2128 13 | 390487451,3,7120 14 | 548977562,1,520 15 | 550156548,2,8430 16 | 552455318,3,3383 17 | 556784565,3,7120 18 | 567354612,11,8430 19 | 573284895,3,7120 20 | 574489456,2,4103 21 | 574489457,1,520 22 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/39.out: -------------------------------------------------------------------------------- 1 | aname 2 | Boeing 747-400 3 | Boeing 737-800 4 | Airbus A340-300 5 | British Aerospace Jetstream 41 6 | Embraer ERJ-145 7 | SAAB 340 8 | Piper Archer III 9 | Tupolev 154 10 | Lockheed L1011 11 | Boeing 757-300 12 | Boeing 777-300 13 | Boeing 767-400ER 14 | Airbus A320 15 | Airbus A319 16 | Boeing 727 17 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/4-1.txt: -------------------------------------------------------------------------------- 1 | C_name,meets_at 2 | class1,mon 3 | class2,mon 4 | class3,tue 5 | class4,tue 6 | class5,fri 7 | class6,fri 8 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/4-2.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class1 3 | S1,class2 4 | S1,class3 5 | S2,class1 6 | S3,class2 7 | S3,class5 8 | S3,class4 9 | S4,class2 10 | S4,class4 11 | S5,class3 12 | S6,class3 13 | S6,class4 14 | S7,class1 15 | S7,class3 16 | S7,class5 17 | S8,class4 18 | S9,class5 19 | S9,class6 20 | S10,class4 21 | S10,class5 22 | S10,class6 23 | S11,class3 24 | S11,class6 25 | S12,class1 26 | S12,class2 27 | S13,class3 28 | S13,class4 29 | S14,class5 30 | S14,class6 31 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/4-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,stu1 3 | S2,stu2 4 | S3,stu3 5 | S4,stu4 6 | S5,stu5 7 | S6,stu6 8 | S7,stu7 9 | S8,stu8 10 | S9,stu9 11 | S10,stu10 12 | S11,stu11 13 | S12,stu12 14 | S13,stu13 15 | S14,stu14 16 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/4.out: -------------------------------------------------------------------------------- 1 | S_name 2 | stu1 3 | stu10 4 | stu12 5 | stu13 6 | stu14 7 | stu6 8 | stu9 9 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/41.out: -------------------------------------------------------------------------------- 1 | ename 2 | John Williams 3 | Mary Johnson 4 | Betty Adams 5 | James Smith 6 | George Wright 7 | Joseph Thompson 8 | Angela Martinez 9 | Lawrence Sperry 10 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/42.out: -------------------------------------------------------------------------------- 1 | S_name,n 2 | SN1,2 3 | SN2,1 4 | SN3,1 5 | SN4,1 6 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/43.out: -------------------------------------------------------------------------------- 1 | S_name,n 2 | SN1,3 3 | SN2,2 4 | SN3,3 5 | SN4,1 6 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/44.out: -------------------------------------------------------------------------------- 1 | P_name 2 | PN2 3 | PN3 4 | PN5 5 | PN6 6 | PN9 7 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/45.out: -------------------------------------------------------------------------------- 1 | F_name,Room 2 | teach7,R128 3 | teach8,R128 4 | teach4,R128 5 | teach5,R128 6 | teach9,R128 7 | teach1,R128 8 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/46.out: -------------------------------------------------------------------------------- 1 | eid,n 2 | 269734834,14 3 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/47.out: -------------------------------------------------------------------------------- 1 | aid,aname 2 | 11,Boeing 777-300 3 | 15,Boeing 727 4 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/48.out: -------------------------------------------------------------------------------- 1 | P_id,S_name,n 2 | P1,SN2,1 3 | P2,SN2,1 4 | P2,SN3,1 5 | P3,SN3,1 6 | P3,SN4,1 7 | P5,SN2,1 8 | P5,SN3,1 9 | P6,SN3,1 10 | P8,SN2,1 11 | P9,SN4,1 12 | P9,SN3,1 13 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/49.out: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P4,SN1 3 | P6,SN3 4 | P7,SN1 5 | P8,SN2 6 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/5-1.txt: -------------------------------------------------------------------------------- 1 | C_name,F_key,Room 2 | C1,F1,R101 3 | C2,F1,R102 4 | C3,F1,R103 5 | C4,F2,R103 6 | C5,F3,R101 7 | C6,F4,R101 8 | C7,F2,R101 9 | C8,F4,R102 10 | C9,F4,R103 11 | C10,F5,R101 12 | C11,F5,R102 13 | C12,F5,R103 14 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/5-2.txt: -------------------------------------------------------------------------------- 1 | F_key,F_name 2 | F1,teach1 3 | F2,teach2 4 | F3,teach3 5 | F4,teach4 6 | F5,teach5 7 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/5.out: -------------------------------------------------------------------------------- 1 | F_name 2 | teach1 3 | teach4 4 | teach5 5 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/50.out: -------------------------------------------------------------------------------- 1 | eid,ename 2 | 242518965,James Smith 3 | 552455318,Larry West 4 | 573284895,Eric Cooper 5 | 574489456,William Jones 6 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/51.out: -------------------------------------------------------------------------------- 1 | S_name,n 2 | SN1,2 3 | SN9,2 4 | SN2,3 5 | SN5,3 6 | SN8,3 7 | SN2,2 8 | SN4,2 9 | SN1,3 10 | SN6,3 11 | SN3,2 12 | SN8,2 13 | SN4,3 14 | SN7,3 15 | SN10,3 16 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/52.out: -------------------------------------------------------------------------------- 1 | eid 2 | 15645489 3 | 248965255 4 | 254099823 5 | 287321212 6 | 310454877 7 | 348121549 8 | 486512566 9 | 489221823 10 | 489456522 11 | 552455348 12 | 619023588 13 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/53.out: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN2 3 | P2,SN2 4 | P3,SN3 5 | P4,SN1 6 | P5,SN3 7 | P6,SN3 8 | P7,SN1 9 | P8,SN2 10 | P9,SN4 11 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/54.out: -------------------------------------------------------------------------------- 1 | eid 2 | 550156548 3 | 11564812 4 | 242518965 5 | 159542516 6 | 90873519 7 | 356187925 8 | 574489456 9 | 548977562 10 | 574489457 11 | 310454876 12 | 355548984 13 | 274878974 14 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/55.out: -------------------------------------------------------------------------------- 1 | ename,eid 2 | Karen Scott,550156548 3 | Mark Young,556784565 4 | Lisa Walker,567354612 5 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/6-1.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class1 3 | S1,class2 4 | S1,class3 5 | S2,class1 6 | S2,class4 7 | S2,class7 8 | S3,class2 9 | S3,class4 10 | S3,class5 11 | S4,class1 12 | S4,class2 13 | S4,class4 14 | S4,class5 15 | S5,class3 16 | S5,class4 17 | S5,class6 18 | S5,class7 19 | S6,class3 20 | S6,class4 21 | S6,class9 22 | S7,class1 23 | S7,class3 24 | S7,class5 25 | S7,class6 26 | S8,class2 27 | S8,class3 28 | S8,class4 29 | S8,class5 30 | S8,class6 31 | S8,class8 32 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/6-2.txt: -------------------------------------------------------------------------------- 1 | C_name,F_key 2 | class1,f1 3 | class2,f2 4 | class3,f2 5 | class4,f3 6 | class5,f3 7 | class6,f3 8 | class7,f4 9 | class8,f4 10 | class9,f1 11 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/6-3.txt: -------------------------------------------------------------------------------- 1 | F_key,F_name 2 | f1,faculty1 3 | f2,faculty2 4 | f3,faculty3 5 | f4,faculty4 6 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/6.out: -------------------------------------------------------------------------------- 1 | F_name 2 | faculty1 3 | faculty4 4 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/7-1.txt: -------------------------------------------------------------------------------- 1 | S_key,level,age 2 | S1,JR,18 3 | S2,SR,24 4 | S3,JR,21 5 | S4,SR,22 6 | S5,JR,18 7 | S6,SO,20 8 | S7,SO,22 9 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/7.out: -------------------------------------------------------------------------------- 1 | level,meanage 2 | JR,19 3 | SO,21 4 | SR,23 5 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/8-1.txt: -------------------------------------------------------------------------------- 1 | S_key,level,age 2 | S1,JR,18 3 | S2,SR,24 4 | S3,JR,21 5 | S4,SR,22 6 | S5,JR,18 7 | S6,SO,20 8 | S7,SO,22 9 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/8.out: -------------------------------------------------------------------------------- 1 | level,meanage 2 | SO,21 3 | SR,23 4 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/9-1.txt: -------------------------------------------------------------------------------- 1 | ID_class,ID_key,Room 2 | C1,F1,R101 3 | C2,F1,R128 4 | C3,F1,R103 5 | C4,F2,R103 6 | C5,F3,R101 7 | C6,F4,R128 8 | C7,F2,R101 9 | C9,F5,R128 10 | C10,F6,R102 11 | C11,F7,R128 12 | C12,F7,R103 13 | C13,F8,R102 14 | C14,F8,R128 15 | C15,F8,R128 16 | C16,F4,R128 17 | C17,F5,R128 18 | C18,F5,R128 19 | C19,F9,R128 20 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/9-2.txt: -------------------------------------------------------------------------------- 1 | ID_key,F_name 2 | F1,teach1 3 | F2,teach2 4 | F3,teach3 5 | F4,teach4 6 | F5,teach5 7 | F6,teach6 8 | F7,teach7 9 | F8,teach8 10 | F9,teach9 11 | -------------------------------------------------------------------------------- /tests-examples/cp19/tables/9.out: -------------------------------------------------------------------------------- 1 | F_name,n 2 | teach4,2 3 | teach5,3 4 | teach9,1 5 | -------------------------------------------------------------------------------- /tests-examples/demo/demo.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/demo/tables/parts.txt, tests-examples/demo/tables/supplier.txt 2 | output: tests-examples/demo/tables/demo.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 1 8 | 9 | # demo optimal solution 10 | -------------------------------------------------------------------------------- /tests-examples/demo/tables/demo.out: -------------------------------------------------------------------------------- 1 | PartName 2 | Tire 3 | -------------------------------------------------------------------------------- /tests-examples/demo/tables/parts.txt: -------------------------------------------------------------------------------- 1 | Id,PartName 2 | 1,Tire 3 | 2,Suspension 4 | -------------------------------------------------------------------------------- /tests-examples/demo/tables/supplier.txt: -------------------------------------------------------------------------------- 1 | Id,SupplierName 2 | 1,Michelin 3 | -------------------------------------------------------------------------------- /tests-examples/scythe/dev_set/1.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/scythe/dev_set/tables/01-1.txt 2 | output: tests-examples/scythe/dev_set/tables/01.out 3 | const: 4 | aggrs: "max" 5 | attrs: "rev" 6 | loc: 2 7 | 8 | #solution 9 | 10 | Select t1.id, t1.rev, t1.content 11 | From t As t1 Join ( 12 | Select id, Max(rev) As maxrev 13 | From t 14 | Group By id 15 | ) As t2 16 | On t1.id = t2.id And t1.rev = t2.maxrev -------------------------------------------------------------------------------- /tests-examples/scythe/dev_set/tables/01-1.txt: -------------------------------------------------------------------------------- 1 | id,rev,content 2 | 1,1,A 3 | 2,1,B 4 | 1,2,C 5 | 1,3,D 6 | 2,3,E 7 | -------------------------------------------------------------------------------- /tests-examples/scythe/dev_set/tables/01.out: -------------------------------------------------------------------------------- 1 | id,rev,content 2 | 1,3,D 3 | 2,3,E 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/dev_set/tables/02-1.txt: -------------------------------------------------------------------------------- 1 | locId,dtg,temp 2 | 100,2009-02-25 9:53:00,15 3 | 100,2009-02-25 9:52:00,16 4 | 200,2009-02-25 10:00:00,20 5 | 300,2009-02-25 10:00:00,24 6 | 100,2009-02-25 09:45:00,13 7 | 300,2009-02-25 09:45:00,16 8 | 200,2009-02-25 09:45:00,18 9 | 400,2009-02-25 09:45:00,12 10 | 100,2009-02-25 09:30:00,11 11 | 300,2009-02-25 09:30:00,14 12 | 200,2009-02-25 09:30:00,15 13 | 400,2009-02-25 09:30:00,10 14 | -------------------------------------------------------------------------------- /tests-examples/scythe/dev_set/tables/02.out: -------------------------------------------------------------------------------- 1 | locId,dtg,temp 2 | 100,2009-02-25 09:53:00,15 3 | 200,2009-02-25 10:00:00,20 4 | 300,2009-02-25 10:00:00,24 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/dev_set/tables/03-1.txt: -------------------------------------------------------------------------------- 1 | id,customer,total 2 | 1,Joem,5 3 | 2,Joem,6 4 | 3,Joem,6 5 | 4,Joem,6 6 | 5,Sally,3 7 | 6,Joem,2 8 | 7,Sally,1 9 | 10 | -------------------------------------------------------------------------------- /tests-examples/scythe/dev_set/tables/03.out: -------------------------------------------------------------------------------- 1 | minid,customer,maxtotal 2 | 2,Joe,6 3 | 5,Sally,3 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/10.in: -------------------------------------------------------------------------------- 1 | inputs: 2 | output: 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 7 | 8 | #solution 9 | 10 | http://stackoverflow.com/questions/40165672/sql-for-islands-and-gaps-islands-can-overlap -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/15.in: -------------------------------------------------------------------------------- 1 | inputs: 2 | output: 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 7 | 8 | #solution 9 | 10 | http://stackoverflow.com/questions/40131799/dynamic-column-sql-pivot-table -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/20.in: -------------------------------------------------------------------------------- 1 | inputs: 2 | output: 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 7 | 8 | #solution 9 | 10 | http://stackoverflow.com/questions/40079682/hive-return-each-users-action-list -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/24.in: -------------------------------------------------------------------------------- 1 | inputs: 2 | output: 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 7 | 8 | #solution 9 | 10 | http://stackoverflow.com/questions/40067193/average-of-grouped-rows-in-sql -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/26.in: -------------------------------------------------------------------------------- 1 | inputs: 2 | output: 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 7 | 8 | #solution 9 | 10 | http://stackoverflow.com/questions/40058220/is-it-possible-to-retrieve-in-output-which-predicate-in-where-clause-is-evaluate -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/27.in: -------------------------------------------------------------------------------- 1 | inputs: 2 | output: 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 7 | 8 | #solution 9 | 10 | http://stackoverflow.com/questions/40048796/how-to-add-select-in-a-group-by-sql-query -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/29.in: -------------------------------------------------------------------------------- 1 | inputs: 2 | output: 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 7 | 8 | #solution 9 | 10 | http://stackoverflow.com/questions/40029922/concatenate-data-in-sql-query -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/3.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/scythe/recent_posts/tables/03-1.txt, tests-examples/scythe/recent_posts/tables/03-2.txt 2 | output: tests-examples/scythe/recent_posts/tables/03.out 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 7 | 8 | #solution 9 | 10 | select a.id, b.f1 11 | from tblA as a inner join 12 | tblB as b 13 | on b.f2 = a.item 14 | order by a.id; 15 | 16 | http://stackoverflow.com/questions/40202795/ms-access-sql-expand -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/33.in: -------------------------------------------------------------------------------- 1 | inputs: 2 | output: 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 7 | 8 | #solution 9 | 10 | http://stackoverflow.com/questions/40011665/get-difference-from-an-aggregated-value-and-another-column-in-sql -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/35.in: -------------------------------------------------------------------------------- 1 | inputs: 2 | output: 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 7 | 8 | #solution 9 | 10 | http://stackoverflow.com/questions/40004180/how-to-return-percentage-in-postgresql -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/37.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/scythe/recent_posts/tables/37-1.txt 2 | output: tests-examples/scythe/recent_posts/tables/37.out 3 | const: 4 | aggrs: "max", "min" 5 | attrs: "StartDate", "EndDate" 6 | loc: 7 | 8 | #solution 9 | 10 | http://stackoverflow.com/questions/40001797/sql-2012-compare-dates-across-several-rows -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/38.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/scythe/recent_posts/tables/38-1.txt, tests-examples/scythe/recent_posts/tables/38-2.txt 2 | output: tests-examples/scythe/recent_posts/tables/38.out 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 7 | 8 | #solution 9 | 10 | SELECT t2.Date,t2.Tapped,t1.sold sold,t2.Tapped 11 | FROM Table1 t1 12 | RIGHT JOIN Table2 t2 13 | ON t1.Date=t2.Date 14 | 15 | http://stackoverflow.com/questions/39992015/joining-data-when-one-table-has-null-value -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/41.in: -------------------------------------------------------------------------------- 1 | inputs: 2 | output: 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 7 | 8 | #solution 9 | 10 | http://stackoverflow.com/questions/39982085/converting-column-headers-to-row-elements -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/42.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/scythe/recent_posts/tables/42-1.txt 2 | output: tests-examples/scythe/recent_posts/tables/42.out 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 0 7 | 8 | #solution 9 | 10 | SELECT id, name 11 | FROM dbo.NerdsTable 12 | ORDER BY school ASC, id ASC 13 | 14 | http://stackoverflow.com/questions/39981320/grouping-while-maintaining-next-record -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/43.in: -------------------------------------------------------------------------------- 1 | inputs: 2 | output: 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 7 | 8 | #solution 9 | 10 | http://stackoverflow.com/questions/39968561/sql-server-compare-dates-between-rows -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/49.in: -------------------------------------------------------------------------------- 1 | inputs: 2 | output: 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 7 | 8 | #solution 9 | 10 | http://stackoverflow.com/questions/39955394/sql-how-to-get-select-attribute-that-is-array-by-join -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/51.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/scythe/recent_posts/tables/51-1.txt, tests-examples/scythe/recent_posts/tables/51-2.txt 2 | output: tests-examples/scythe/recent_posts/tables/51.out 3 | const: 4 | aggrs: "concat_grouped" 5 | attrs: "Author" 6 | loc: 2 7 | 8 | #solution 9 | 10 | Select a.isbn, a.title, group_concat(b.author ) 11 | from Book_title, 12 | INNER JOIN Book_authoron a.isbn = b.isbn_id 13 | group by a.isbn, a.title -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/8.in: -------------------------------------------------------------------------------- 1 | inputs: 2 | output: 3 | const: 4 | aggrs: 5 | attrs: 6 | loc: 7 | 8 | #solution 9 | 10 | http://stackoverflow.com/questions/40170119/get-last-2-years-value-and-oldest-year-sql -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/01-1.txt: -------------------------------------------------------------------------------- 1 | id_invitation,id_demand,company 2 | 1,1,facebook 3 | 2,1,linkedin 4 | 3,2,NULL[str] 5 | 4,2,yahoo 6 | 5,3,NULL[str] 7 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/01-2.txt: -------------------------------------------------------------------------------- 1 | id_invitation,id_demand,company 2 | 1,1,google 3 | 2,1,NULL[str] 4 | 3,2,google 5 | 4,2,NULL[str] 6 | 5,3,google 7 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/01.out: -------------------------------------------------------------------------------- 1 | company,id_demand 2 | facebook,1 3 | linkedin,1 4 | yahoo,2 5 | google,1 6 | google,2 7 | google,3 8 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/02-1.txt: -------------------------------------------------------------------------------- 1 | Start,End 2 | 1,NULL[num] 3 | 3,4 4 | 6,9 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/02.out: -------------------------------------------------------------------------------- 1 | Start,End 2 | 1,3 3 | 3,4 4 | 4,6 5 | 6,9 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/03-1.txt: -------------------------------------------------------------------------------- 1 | ID,item 2 | 1,c 3 | 2,a 4 | 3,b 5 | 4,e 6 | 5,d 7 | 6,f 8 | 7,a 9 | 8,c 10 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/03-2.txt: -------------------------------------------------------------------------------- 1 | ID,item 2 | a,NULL[str] 3 | b,a 4 | c,a 5 | d,NULL[str] 6 | e,NULL[str] 7 | f,d 8 | g,d 9 | h,d 10 | I,NULL[str] 11 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/03.out: -------------------------------------------------------------------------------- 1 | ID,item 2 | 2,b 3 | 2,c 4 | 5,f 5 | 5,g 6 | 5,h 7 | 7,b 8 | 7,c 9 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/04-1.txt: -------------------------------------------------------------------------------- 1 | id,call_ref,job_num 2 | 1,123445,2389 3 | 2,342537,0 4 | 3,876483,2389 5 | 4,644686,5643 6 | 5,654532,0 7 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/04.out: -------------------------------------------------------------------------------- 1 | call_ref,job_num 2 | 342537,0 3 | 876483,2389 4 | 644686,5643 5 | 654532,0 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/05-1.txt: -------------------------------------------------------------------------------- 1 | g_event_id,prim_cid,event_id,event_time 2 | 1,111,16,20161021160000 3 | 2,111,17,20161021160001 4 | 3,111,18,20161021160002 5 | 4,222,15,20161021160101 6 | 5,222,17,20161021160102 7 | 6,333,16,20161021160201 8 | 7,333,17,20161021160202 9 | 8,333,18,20161021160238 10 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/05.out: -------------------------------------------------------------------------------- 1 | g_event_id,prim_cid,event_id,maxevent_time 2 | 5,222,17,20161021160102 3 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/06-1.txt: -------------------------------------------------------------------------------- 1 | ID,code,product_variants_id,product_name,variants,variants_value 2 | 1,1,123451,beercake,color,blue 3 | 2,1,123451,beercake,temperature,hot 4 | 3,1,123451,beercake,weight,0.5 5 | 4,2,123453,adwrap,color,green 6 | 5,2,123453,adwrap,weight,1 7 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/06.out: -------------------------------------------------------------------------------- 1 | code,product_variants_id,product_name,variants 2 | 1,1,123451,beercake,temperature:hot 3 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/07-1.txt: -------------------------------------------------------------------------------- 1 | Employee,FromDate,ToDate,Code 2 | Employee,07012016,07312016,4 3 | Employee,06012016,06302016,2 4 | Employee,05012016,05312016,2 5 | Employee,04012016,04302016,3 6 | Employee,03012016,03312016,3 7 | Employee,02012016,02292016,4 8 | Employee,01012016,01312016,4 9 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/07.out: -------------------------------------------------------------------------------- 1 | Employee,Code,minFromDate,maxToDate 2 | Employee,2,05012016,06302016 3 | Employee,3,03012016,04302016 4 | Employee,4,01012016,07312016 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/09-1.txt: -------------------------------------------------------------------------------- 1 | c1,c2,c3,c4,c5 2 | 1,1234,20160705,"thisisatest",3 3 | 2,1234,20160706,"thisisatest",3 4 | 3,5678,20160707,"thisisanothertest",3 5 | 4,5678,20160708,"thisisanothertest",3 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/09.out: -------------------------------------------------------------------------------- 1 | c2,c4,n 2 | 1234,"thisisatest",2 3 | 5678,"thisisanothertest",2 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/11-1.txt: -------------------------------------------------------------------------------- 1 | ID,Name,Value 2 | 123,Manufacturer,Dell 3 | 123,Model,LatitudeE5450 4 | 456,Manufacturer,HP 5 | 456,Model,ProBook450G3 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/11.out: -------------------------------------------------------------------------------- 1 | ID,Value 2 | 123,Dell:LatitudeE5450 3 | 456,HP:ProBook450G3 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/12-1.txt: -------------------------------------------------------------------------------- 1 | ID,code,product_variants_id,product_name,variants,variants_value 2 | 1,1,123451,beercake,color,blue 3 | 2,1,123451,beercake,temperature,cold 4 | 3,1,123451,beercake,weight,"0.5" 5 | 4,2,123453,adwrap,color,green 6 | 5,2,123453,adwrap,weight,"1" 7 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/12.out: -------------------------------------------------------------------------------- 1 | product_variants_id,product_name,variants,variants_value 2 | 123451,beercake,color:temperature:weight,blue:cold:"0.5" 3 | 123453,adwrap,color:weight,green:"1" 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/13-1.txt: -------------------------------------------------------------------------------- 1 | ID,Name 2 | 1,Company1 3 | 2,Company2 4 | 3,Company3 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/13-2.txt: -------------------------------------------------------------------------------- 1 | ID,Company_group 2 | 1,Company3 3 | 2,Company2 4 | 3,Company2 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/13.out: -------------------------------------------------------------------------------- 1 | ID,Name,RootName,RootId 2 | 1,Company1,Company3,3 3 | 3,Company3,Company2,2 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/14-1.txt: -------------------------------------------------------------------------------- 1 | ID,NAME,PARENT_ID 2 | 1,child1,1 3 | 2,child2,1 4 | 3,child3,1 5 | 4,child4,1 6 | 5,child5,1 7 | 6,child6,2 8 | 7,child7,2 9 | 8,child8,2 10 | 9,child9,2 11 | 10,child10,2 12 | 11,child11,2 13 | 12,child12,2 14 | 13,child13,2 15 | 14,child14,2 16 | 15,child15,3 17 | 16,child16,3 18 | 17,child17,3 19 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/14-2.txt: -------------------------------------------------------------------------------- 1 | ID,NAME,PARENT_ID 2 | 1,parent1,1 3 | 2,parent2,2 4 | 3,parent3,3 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/14.out: -------------------------------------------------------------------------------- 1 | ID,NAME,PARENT_ID 2 | 1,child1,1 3 | 2,child2,1 4 | 3,child3,1 5 | 4,child4,1 6 | 5,child5,1 7 | 6,child6,2 8 | 7,child7,2 9 | 8,child8,2 10 | 9,child9,2 11 | 10,child10,2 12 | 11,child11,2 13 | 12,child12,2 14 | 13,child13,2 15 | 14,child14,2 16 | 15,child15,3 17 | 16,child16,3 18 | 17,child17,3 19 | 1,parent1,1 20 | 2,parent2,2 21 | 3,parent3,3 22 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/16-1.txt: -------------------------------------------------------------------------------- 1 | CustomerId 2 | C1 3 | C2 4 | C3 5 | C4 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/16-2.txt: -------------------------------------------------------------------------------- 1 | CustomerId,ReportDt 2 | C1,10012016 3 | C1,10192016 4 | C1,09172016 5 | C2,10182016 6 | C2,09012016 7 | C3,10192016 8 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/16.out: -------------------------------------------------------------------------------- 1 | CustomerId,maxReportDt,n 2 | C1,10192016,3 3 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/17-1.txt: -------------------------------------------------------------------------------- 1 | emp_id,emp_sal,emp_grp 2 | 1,5,HMCCR 3 | 1,10,HMCPR 4 | 1,20,HMCPR 5 | 1,30,HMCPR 6 | 1,40,HMCRR 7 | 2,40,HMCRR 8 | 2,50,HMCCR 9 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/17.out: -------------------------------------------------------------------------------- 1 | emp_id,minemp_sal,emp_grp 2 | 1,10,HMCPR 3 | 2,40,HMCRR 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/18-1.txt: -------------------------------------------------------------------------------- 1 | OrderID,CustomerID,Date,Course 2 | 14954,13440,10162016,Zurich 3 | 14955,13441,10172016,Bern 4 | 14956,13441,10172016,Aargau 5 | 14957,13442,10172016,Bern 6 | 149554,13444,10172016,Bern 7 | 14958,10483,10172016,Zurich 8 | 14959,13442,10182016,Solothurn 9 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/18.out: -------------------------------------------------------------------------------- 1 | Course,n 2 | Bern,3 3 | Zurich,1 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/19-1.txt: -------------------------------------------------------------------------------- 1 | CustomerID,Balance,Date 2 | 1,100,09072016 3 | 1,-50,09082016 4 | 1,-60,09092016 5 | 1,500,09102016 6 | 1,600,09112016 7 | 1,-100,09122016 8 | 1,-200,09132016 9 | 1,-400,09142016 10 | 1,-500,09152016 11 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/19.out: -------------------------------------------------------------------------------- 1 | CustomerID,Balance,Date 2 | 1,-100,09122016 3 | 1,-200,09132016 4 | 1,-400,09142016 5 | 1,-500,09152016 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/21-1.txt: -------------------------------------------------------------------------------- 1 | id_order,product_id 2 | a,22 3 | a,32 4 | b,22 5 | b,42 6 | b,52 7 | b,32 8 | c,22 9 | c,12 10 | d,22 11 | d,32 12 | d,12 13 | e,12 14 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/21.out: -------------------------------------------------------------------------------- 1 | product_id,n 2 | 32,3 3 | 12,2 4 | 42,1 5 | 52,1 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/22-1.txt: -------------------------------------------------------------------------------- 1 | c1,c2,c3 2 | 1,1,Somesongtitle 3 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/22-2.txt: -------------------------------------------------------------------------------- 1 | c1,c2 2 | 72,11 3 | 73,11 4 | 74,11 5 | 73,41 6 | 74,21 7 | 74,31 8 | 75,51 9 | 73,61 10 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/22.out: -------------------------------------------------------------------------------- 1 | maxc1 2 | 74 3 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/23-1.txt: -------------------------------------------------------------------------------- 1 | Child,Name,Parent 2 | 1,A,1-3 3 | 2,B,1-3 4 | 3,C,1-3 5 | 1-3,D,1-10 6 | 3-5,E,1-10 7 | 6-10,F,1-10 8 | 1-10,G,1-100 9 | 201,w,200-210 10 | 202,x,200-210 11 | 203,y,200-210 12 | 200-210,z,200-300 13 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/23.out: -------------------------------------------------------------------------------- 1 | t1.Child,t1.Name,t2.Child,t2.Name,t3.Child,t3.Name,t4.Child,t4.Name 2 | 1-100,root,1-10,G,1-3,D,1,A 3 | 1-100,root,1-10,G,1-3,D,1,B 4 | 1-100,root,1-10,G,1-3,D,1,C 5 | 200-300,root,200-210,z,201,w,NULL[str],NULL[str] 6 | 200-300,root,200-210,z,202,x,NULL[str],NULL[str] 7 | 200-300,root,200-210,z,203,y,NULL[str],NULL[str] 8 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/24-1.txt: -------------------------------------------------------------------------------- 1 | Id,Color,Month 2 | 1,blue,October 3 | 2,red,January 4 | 3,green,September 5 | 4,red,October 6 | 5,red,March 7 | 6,blue,March 8 | 7,red,March 9 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/24.out: -------------------------------------------------------------------------------- 1 | Month,meanMonth 2 | October,0.5 3 | January,0 4 | September,0 5 | March,0.33 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/25-1.txt: -------------------------------------------------------------------------------- 1 | id,gallery_id,path 2 | 58,NULL[num],58.jpg 3 | 59,NULL[num],59.jpg 4 | 66,9,9-001.jpg 5 | 67,9,9-002.jpg 6 | 68,10,10-001.jpg 7 | 69,10,10-002.jpg 8 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/25.out: -------------------------------------------------------------------------------- 1 | id,gallery_id,path 2 | 68,10,10-001.jpg 3 | 66,9,9-001.jpg 4 | 58,NULL[num],58.jpg 5 | 59,NULL[num],59.jpg 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/28-1.txt: -------------------------------------------------------------------------------- 1 | Member,Element 2 | 1,A 3 | 1,B 4 | 1,C 5 | 1,E 6 | 22,A 7 | 22,B 8 | 22,C 9 | 22,D 10 | 3,A 11 | 3,D 12 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/28.out: -------------------------------------------------------------------------------- 1 | Member,n 2 | 3,1 3 | 22,3 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/30-1.txt: -------------------------------------------------------------------------------- 1 | id_type,item_id,qty_sold,price_extended,date_effective 2 | invoice,18117,8,13.1600,20161001 3 | invoice,17473,1,2.2500,20161001 4 | invoice,18117,1,1.0000,20161001 5 | invoice,18117,7,2.0000,20161001 6 | invoice,18117,5,3.0000,20161001 7 | invoice,17473,3,4.0000,20161001 8 | invoice,17568,1,4.0000,20161001 9 | invoice,17568,5,3.0000,20161001 10 | invoice,18117,8,2.0000,20161001 11 | invoice,17473,1,1.0000,20161001 12 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/30-2.txt: -------------------------------------------------------------------------------- 1 | type,id,sort_order,attribute,value 2 | items,17473,1,previous_editions,15743 3 | items,17568,1,previous_editions,3893 4 | items,17568,2,previous_editions,7626 5 | items,18117,1,previous_editions,14430 6 | items,18117,2,previous_editions,17337 7 | items,18117,3,previous_editions,17123 8 | items,18117,4,previous_editions,17614 9 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/30.out: -------------------------------------------------------------------------------- 1 | item_id,current_id_sales,previous_id_sales 2 | 17473,15743,9625 3 | 17568,3893,24232 4 | 18117,14430,8083 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/31-1.txt: -------------------------------------------------------------------------------- 1 | channelID,accountID,role 2 | 1,Bob,100 3 | 2,Bob,100 4 | 1,Dave,101 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/31-2.txt: -------------------------------------------------------------------------------- 1 | channelID,channelName,type 2 | 1,PublicChannel,public 3 | 2,PrivateChannel,private 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/31.out: -------------------------------------------------------------------------------- 1 | channelID,accountID,role 2 | 1,Dave,101 3 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/32-1.txt: -------------------------------------------------------------------------------- 1 | Id,crit1,crit2,value 2 | 1,11,2,a 3 | 2,21,2,b 4 | 3,11,3,c 5 | 4,11,1,d 6 | 5,21,2,e 7 | 6,11,2,f 8 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/32.out: -------------------------------------------------------------------------------- 1 | crit1,crit2,value 2 | 11,3,c 3 | 11,1,d 4 | 21,2,e 5 | 11,2,f 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/34-1.txt: -------------------------------------------------------------------------------- 1 | MATERIAL,DISCO_DATE,DATE_UPDATE 2 | T6C25AWABC,0,20160914 3 | T6C25AWABC,20161028,20160921 4 | T6C25AWABC,20161031,20160930 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/34.out: -------------------------------------------------------------------------------- 1 | MATERIAL,maxDISCO_DATE,maxDATE_UPDATE 2 | T6C25AWABC,20161031,20160930 3 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/36-1.txt: -------------------------------------------------------------------------------- 1 | Account,Sen1,Sen2 2 | 1234,1,0 3 | 1235,0,1 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/36-2.txt: -------------------------------------------------------------------------------- 1 | ID,Name 2 | 1,Box 3 | 2,XXX 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/36.out: -------------------------------------------------------------------------------- 1 | Account,Name 2 | 1234,Box 3 | 1235,Box 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/37-1.txt: -------------------------------------------------------------------------------- 1 | Region,Area,StartDate,EndDate 2 | A,1,01012016,03312016 3 | A,1,04012016,05312016 4 | A,1,07012016,09302016 5 | A,1,10012016,01312017 6 | A,1,02012017,12312017 7 | B,2,01012016,04302016 8 | B,2,05012016,09302016 9 | A,4,01012016,05312016 10 | A,4,06012016,12312016 11 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/37.out: -------------------------------------------------------------------------------- 1 | Region,Area,StartDate,EndDate 2 | A,1,01012016,05312016 3 | A,1,07012016,12312017 4 | B,2,01012016,09302016 5 | A,4,01012016,12312016 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/38-1.txt: -------------------------------------------------------------------------------- 1 | Date,Sold 2 | 1008,22 3 | 1009,31 4 | 1011,54 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/38-2.txt: -------------------------------------------------------------------------------- 1 | Date,Tapped 2 | 1008,23 3 | 1009,31 4 | 1010,0 5 | 1011,54 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/38.out: -------------------------------------------------------------------------------- 1 | Date,Tapped,Sold 2 | 1008,23,22 3 | 1009,31,31 4 | 1010,0,NULL[num] 5 | 1011,54,54 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/39-1.txt: -------------------------------------------------------------------------------- 1 | zoom,point,size 2 | 9,51,21 3 | 9,75,45 4 | 9,74,34 5 | 10,75,4 6 | 10,72,63 7 | 10,85,22 8 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/39.out: -------------------------------------------------------------------------------- 1 | n,sumsize 2 | 3,100 3 | 3,89 4 | 6,189 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/40-1.txt: -------------------------------------------------------------------------------- 1 | id,timestamp,first_name,last_name,action 2 | '1,012545878,homer,simpson,eating 3 | '2,812345222,homer,simpson,watchingtv 4 | '3,312322578,marge,simpson,cooking 5 | '4,114568568,bart,simpson,skating 6 | '5,015345345,bart,simpson,skating 7 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/40.out: -------------------------------------------------------------------------------- 1 | id,timestamp,first_name,last_name,action 2 | '1,012545878,homer,simpson,eating 3 | '2,812345222,homer,simpson,watchingtv 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/42-1.txt: -------------------------------------------------------------------------------- 1 | id,name,school 2 | 1,Joe,ODU 3 | 2,Mike,VCU 4 | 3,Ane,ODU 5 | 4,Trevor,VT 6 | 5,Cools,VCU 7 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/42.out: -------------------------------------------------------------------------------- 1 | id,name 2 | 1,Joe 3 | 2,Mike 4 | 3,Ane 5 | 4,Trevor 6 | 5,Cools 7 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/44-1.txt: -------------------------------------------------------------------------------- 1 | OriginalID,Area 2 | 2,Abdomen 3 | 1,Abdomen 4 | 3,Abdomen 5 | 4,Bottom 6 | 5,Bottom 7 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/44-2.txt: -------------------------------------------------------------------------------- 1 | Part,OriginalID 2 | Abdomen,1 3 | Abdomen,2 4 | Bottom,5 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/44.out: -------------------------------------------------------------------------------- 1 | OriginalID,Area 2 | 3,Abdomen 3 | 4,Bottom 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/45-1.txt: -------------------------------------------------------------------------------- 1 | Menu_id,Name 2 | 1,MenuOne 3 | 2,MenuTwo 4 | 3,MenuThree 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/45-2.txt: -------------------------------------------------------------------------------- 1 | ID,quantity,Menu_id 2 | 1,3,1 3 | 2,2,1 4 | 3,4,3 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/45.out: -------------------------------------------------------------------------------- 1 | Name,sumquantity 2 | MenuOne,5 3 | MenuTwo,NA 4 | MenuThree,4 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/46-1.txt: -------------------------------------------------------------------------------- 1 | ID,Type,Value 2 | A,Z01,10 3 | A,Z09,20 4 | B,Z01,30 5 | C,Z01,40 6 | D,Z09,50 7 | F,Z09,50 8 | F,Z01,52 9 | E,Z10,60 10 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/46.out: -------------------------------------------------------------------------------- 1 | ID,Type,Value 2 | D,Z09,50 3 | A,Z01,10 4 | B,Z01,30 5 | C,Z01,40 6 | F,Z01,52 7 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/47-1.txt: -------------------------------------------------------------------------------- 1 | ID,Payment_type,Time 2 | A,X,20140101 3 | A,Y,20140801 4 | B,X,20131001 5 | A,Y,20140801 6 | B,Z,20130901 7 | A,Y,20120101 8 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/47.out: -------------------------------------------------------------------------------- 1 | ID,Payment_type 2 | A,Y 3 | B,X 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/48-1.txt: -------------------------------------------------------------------------------- 1 | letter,d1,d2 2 | 100,2,10 3 | 101,12,20 4 | 102,5,10 5 | 103,1,8 6 | 104,13,15 7 | 105,25,30 8 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/48.out: -------------------------------------------------------------------------------- 1 | test_letter,d1,d2,overlap_letter,overlap_d1,overlap_d2 2 | 100,2,10,103,1,8 3 | 100,2,10,102,5,10 4 | 101,12,20,104,13,15 5 | 102,5,10,103,1,8 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/50-1.txt: -------------------------------------------------------------------------------- 1 | role_id,role_type,company,id 2 | 1,A,X,1 3 | 2,B,Y,4 4 | 3,A,Z,2 5 | 4,B,X,5 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/50-2.txt: -------------------------------------------------------------------------------- 1 | id,employee_name,joining_date 2 | 1,Einstein,01241998 3 | 2,Maxwell,03162002 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/50-3.txt: -------------------------------------------------------------------------------- 1 | id,employee_name,joining_date 2 | 4,Google,45 3 | 5,Yahoo,300 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/50.out: -------------------------------------------------------------------------------- 1 | role_id,role_type,id,employee_name,joining_date 2 | 2,B,4,Google,45 3 | 4,B,5,Yahoo,300 4 | 1,A,1,Einstein,1241998 5 | 3,A,2,Maxwell,3162002 6 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/51-1.txt: -------------------------------------------------------------------------------- 1 | isbn,title 2 | 9780195153446,classical 3 | 9780374157067,flu:thestor 4 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/51-2.txt: -------------------------------------------------------------------------------- 1 | isbn,Author 2 | 9780195153446,markp.o.morford 3 | 9780195153446,robertj.lenardon 4 | 9780374157067,ginakolata 5 | -------------------------------------------------------------------------------- /tests-examples/scythe/recent_posts/tables/51.out: -------------------------------------------------------------------------------- 1 | isbn,title,Author 2 | 9780195153446,classical,markp.o.morford:robertj.lenardon 3 | 9780374157067,flu:thestor,ginakolata 4 | -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/2.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/sqlsynthesizer/tables/02-1.txt 2 | output: tests-examples/sqlsynthesizer/tables/02.out 3 | const: 4 | aggrs: "sum" 5 | attrs: "invoice_amount" 6 | loc: 1 7 | 8 | #solution 9 | 10 | Select project_code, Sum(t2.invoice_amount) As sum_invoice_amount 11 | From input1 12 | Group By project_code -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/3.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/sqlsynthesizer/tables/03-1.txt 2 | output: tests-examples/sqlsynthesizer/tables/03.out 3 | const: "5" 4 | aggrs: "n" 5 | attrs: 6 | loc: 2 7 | 8 | # solution 9 | 10 | Select t3.loginid 11 | From 12 | (Select 13 | t2.loginid, Count(t2.provider) As count_provider 14 | From 15 | input1 As t2 16 | Group By 17 | t2.loginid 18 | Having count_provider > 5.0) As t3; -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/5.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/sqlsynthesizer/tables/05-1.txt, tests-examples/sqlsynthesizer/tables/05-2.txt 2 | output: tests-examples/sqlsynthesizer/tables/05.out 3 | const: 4 | aggrs: "n" 5 | attrs: 6 | loc: 2 7 | 8 | # solution 9 | 10 | Select t1.entryid, Count_Distinct(t1.result) As count_distinct_result 11 | From input2 As t1 12 | Group By t1.entryid; -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/tables/01-1.txt: -------------------------------------------------------------------------------- 1 | idx_key,upedonid 2 | k1,id2 3 | k2,id2 4 | k3,id2 5 | k4,NULL[str] 6 | k5,id3 7 | k6,id3 8 | k7,id4 9 | k8,id5 10 | k9,id5 11 | k10,NULL[str] 12 | k11,id6 13 | -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/tables/01.out: -------------------------------------------------------------------------------- 1 | upedonid,n 2 | id2,3 3 | id3,2 4 | id5,2 5 | -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/tables/02-1.txt: -------------------------------------------------------------------------------- 1 | project_code,invoice_key,invoice_amount 2 | proj1,inv1,100 3 | proj1,inv2,200 4 | proj2,inv3,300 5 | proj2,inv4,400 6 | proj3,inv5,500 7 | -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/tables/02.out: -------------------------------------------------------------------------------- 1 | project_code,suminvoice_amount 2 | proj1,300 3 | proj2,700 4 | proj3,500 5 | -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/tables/03-1.txt: -------------------------------------------------------------------------------- 1 | loginid,provider,city 2 | l1,p5,a 3 | l1,p4,b 4 | l1,p3,c 5 | l1,p2,d 6 | l1,p1,e 7 | l1,p0,f 8 | l2,p5,g 9 | l2,p4,h 10 | l2,p3,i 11 | l2,p2,j 12 | l2,p1,k 13 | l3,p1,h 14 | l3,p1,l 15 | l4,p1,c 16 | l4,p2,d 17 | l4,p3,e 18 | l4,p0,k 19 | l4,p4,l 20 | l6,p0,a 21 | l6,p1,c 22 | l6,p2,d 23 | l6,p3,a 24 | l6,p4,d 25 | l6,p5,l 26 | -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/tables/03.out: -------------------------------------------------------------------------------- 1 | loginid 2 | l1 3 | l6 4 | -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/tables/04-1.txt: -------------------------------------------------------------------------------- 1 | T1Column1,T1Column2,T1Column3,T1Column4 2 | 101,2001,3020,010111 3 | 101,2002,3002,020111 4 | 101,2001,3001,030111 5 | 102,2002,3002,010111 6 | -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/tables/04-2.txt: -------------------------------------------------------------------------------- 1 | T2Column1,T1Column2,T2Column3 2 | 20011,2001,200131 3 | 20012,2001,200132 4 | 20013,2001,200133 5 | -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/tables/04-3.txt: -------------------------------------------------------------------------------- 1 | T2Column1,T3Column2 2 | 20011,Site 3 | 20012,Site 4 | 20013,Site 5 | -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/tables/04.out: -------------------------------------------------------------------------------- 1 | T1Column1,T2Column3,T1Column4,T3Column2 2 | 101,200131,010111,Site 3 | 101,200132,010111,Site 4 | 101,200133,010111,Site 5 | -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/tables/05-1.txt: -------------------------------------------------------------------------------- 1 | entryid,title,post 2 | e1,a,a 3 | e2,c,b 4 | e3,d,e 5 | -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/tables/05-2.txt: -------------------------------------------------------------------------------- 1 | v_key,entryid,result 2 | v1,e1,N 3 | v2,e1,L 4 | v3,e2,L 5 | v4,e3,L 6 | -------------------------------------------------------------------------------- /tests-examples/sqlsynthesizer/tables/05.out: -------------------------------------------------------------------------------- 1 | entryid,n 2 | e1,2 3 | e2,1 4 | e3,1 5 | -------------------------------------------------------------------------------- /tests-examples/textbook/10.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/textbook/tables/10-1.txt, tests-examples/textbook/tables/10-2.txt 2 | output: tests-examples/textbook/tables/10.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 3 8 | 9 | # 5.1.10 optimal solution 10 | 11 | inner_join(student,enrolled) %>% 12 | group_by(sname) %>% summarise (n = n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/textbook/11.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/textbook/tables/11-1.txt, tests-examples/textbook/tables/11-2.txt 2 | output: tests-examples/textbook/tables/11.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 2 8 | 9 | # 5.1.11 optimal solution 10 | 11 | anti_join(student,enrolled) %>% select(S_name) -------------------------------------------------------------------------------- /tests-examples/textbook/12.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/textbook/tables/12-1.txt 2 | output: tests-examples/textbook/tables/12.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 2 8 | 9 | # 5.1.12 optimal solution 10 | 11 | student %>% group_by(age,level) %>% summarise(n = n()) %>% 12 | filter(n==max(n)) %>% select(-n) -------------------------------------------------------------------------------- /tests-examples/textbook/13.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/textbook/tables/13-1.txt, tests-examples/textbook/tables/13-2.txt 2 | output: tests-examples/textbook/tables/13.out 3 | const: 4 | aggrs: 5 | attrs: 6 | bools: 7 | loc: 1 8 | 9 | # 5.2.1 optimal solution 10 | 11 | inner_join(parts,catalog) %>% select(part_name) -------------------------------------------------------------------------------- /tests-examples/textbook/14.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/textbook/tables/14-1.txt, tests-examples/textbook/tables/14-2.txt, tests-examples/textbook/tables/14-3.txt 2 | output: tests-examples/textbook/tables/14.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: "n" 6 | bools: "==" 7 | loc: 3 8 | 9 | # 5.2.2 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | group_by(sname) %>% summarise(n=n()) %>% 13 | filter(n == max(n)) %>% select(sname) -------------------------------------------------------------------------------- /tests-examples/textbook/21.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/textbook/tables/21-1.txt, tests-examples/textbook/tables/21-2.txt, tests-examples/textbook/tables/21-3.txt 2 | output: tests-examples/textbook/tables/21.out 3 | const: "red", "green" 4 | aggrs: 5 | attrs: "color" 6 | bools: "==" 7 | loc: 2 8 | 9 | # 5.2.9 optimal solution 10 | 11 | inner_join(parts,catalog) %>% inner_join(suppliers) %>% 12 | filter(color == "red" | color == "green") %>% select(sname) %>% distinct() -------------------------------------------------------------------------------- /tests-examples/textbook/28.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/textbook/tables/employees.txt, tests-examples/textbook/tables/aircraft.txt, tests-examples/textbook/tables/certified.txt 2 | output: tests-examples/textbook/tables/28.out 3 | const: "Boeing" 4 | aggrs: "like" 5 | attrs: "aname" 6 | bools: 7 | loc: 2 8 | 9 | # 5.3.5 optimal solution sql 10 | 11 | SELECT DISTINCT E.ename FROM employees E, certified C, aircraft A WHERE E.eid = C.eid AND C.aid = A.aid AND A.aname like "Boeing%"; 12 | -------------------------------------------------------------------------------- /tests-examples/textbook/29.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/textbook/tables/aircraft.txt, tests-examples/textbook/tables/flights.txt 2 | output: tests-examples/textbook/tables/29.out 3 | const: "Chicago", "Los Angeles" 4 | aggrs: "min" 5 | attrs: "distance", "crusingrange" 6 | bools: 7 | loc: 3 8 | 9 | # 5.3.5 optimal solution sql 10 | 11 | SELECT A.aid FROM aircraft A WHERE A.crusingrange > ( SELECT MIN (F.distance) FROM flights F WHERE F.from = "Los Angeles" AND F.to = "Chicago"); 12 | -------------------------------------------------------------------------------- /tests-examples/textbook/3.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/textbook/tables/3-1.txt, tests-examples/textbook/tables/3-2.txt 2 | output: tests-examples/textbook/tables/3.out 3 | const: "R128", "4" 4 | aggrs: "n" 5 | attrs: "Room" 6 | bools: ">", "==" 7 | loc: 3 8 | 9 | # 5.1.3 optimal solution 10 | 11 | inner_join(id_class_5_1_3,id_enroll_5_1_3) %>% 12 | group_by(ID_key,Room) %>% summarize(n = n()) %>% 13 | filter(Room == "R128" | n > 4) %>% select(ID_key) 14 | -------------------------------------------------------------------------------- /tests-examples/textbook/5.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/textbook/tables/5-1.txt, tests-examples/textbook/tables/5-2.txt 2 | output: tests-examples/textbook/tables/5.out 3 | const: 4 | aggrs: "n", "max(n)" 5 | attrs: 6 | bools: "==" 7 | loc: 3 8 | 9 | # 5.1.5 optimal solution 10 | 11 | inner_join(class,faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter(n == max(n)) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/textbook/6.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/textbook/tables/6-1.txt, tests-examples/textbook/tables/6-2.txt, tests-examples/textbook/tables/6-3.txt 2 | output: tests-examples/textbook/tables/6.out 3 | const: "5" 4 | aggrs: "n" 5 | attrs: 6 | bools: "<=" 7 | loc: 3 8 | 9 | # 5.1.6 optimal solution 10 | 11 | inner_join(class, enroll) %>% inner_join(faculty) %>% 12 | group_by(F_name) %>% summarise(n = n()) %>% 13 | filter (n <= 5) %>% select(F_name) -------------------------------------------------------------------------------- /tests-examples/textbook/7.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/textbook/tables/7-1.txt 2 | output: tests-examples/textbook/tables/7.out 3 | const: 4 | aggrs: "mean" 5 | attrs: "age" 6 | bools: 7 | loc: 1 8 | 9 | # 5.1.7 optimal solution 10 | 11 | student %>% group_by(level) %>% summarise(average=mean(age)) -------------------------------------------------------------------------------- /tests-examples/textbook/8.in: -------------------------------------------------------------------------------- 1 | inputs: tests-examples/textbook/tables/8-1.txt 2 | output: tests-examples/textbook/tables/8.out 3 | const: "JR" 4 | aggrs: "mean" 5 | attrs: "level", "age" 6 | bools: "!=" 7 | loc: 2 8 | 9 | # 5.1.8 optimal solution 10 | 11 | student %>% group_by(level) %>% summarize(average=mean(age)) %>% 12 | filter(level != "JR") -------------------------------------------------------------------------------- /tests-examples/textbook/tables/1-1.txt: -------------------------------------------------------------------------------- 1 | C_name,F_key 2 | class1,f1 3 | class2,f2 4 | class3,f1 5 | class4,f3 6 | class5,f4 7 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/1-2.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class1 3 | S2,class1 4 | S3,class2 5 | S3,class5 6 | S4,class2 7 | S4,class4 8 | S5,class3 9 | S6,class3 10 | S6,class2 11 | S7,class5 12 | S8,class4 13 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/1-3.txt: -------------------------------------------------------------------------------- 1 | F_key,F_name 2 | f1,faculty1 3 | f2,faculty2 4 | f3,faculty3 5 | f4,faculty4 6 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/1-4.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name,level 2 | S1,stu1,JR 3 | S2,stu2,SR 4 | S3,stu3,JR 5 | S4,stu4,SR 6 | S5,stu5,JR 7 | S6,stu6,SR 8 | S7,stu7,JR 9 | S8,stu8,JR 10 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/1.out: -------------------------------------------------------------------------------- 1 | S_name 2 | stu1 3 | stu5 4 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/10-1.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class1 3 | S1,class2 4 | S2,class1 5 | S2,class2 6 | S2,class3 7 | S3,class1 8 | S4,class3 9 | S4,class2 10 | S5,class1 11 | S5,class2 12 | S5,class4 13 | S6,class3 14 | S6,class4 15 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/10-2.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,stu1 3 | S2,stu2 4 | S3,stu3 5 | S4,stu4 6 | S5,stu5 7 | S6,stu6 8 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/10.out: -------------------------------------------------------------------------------- 1 | S_name 2 | stu2 3 | stu5 4 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/11-1.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | S6,SN6 8 | S7,SN7 9 | S8,SN8 10 | S9,SN9 11 | S10,SN10 12 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/11-2.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class2 3 | S2,class1 4 | S4,class2 5 | S4,class4 6 | S5,class4 7 | S7,class5 8 | S7,class1 9 | S8,class4 10 | S10,class5 11 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/11.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN3 3 | SN6 4 | SN9 5 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/12-1.txt: -------------------------------------------------------------------------------- 1 | S_key,age,level 2 | S1,19,SO 3 | S2,19,JR 4 | S3,19,JR 5 | S4,20,SO 6 | S5,20,JR 7 | S6,20,SO 8 | S7,21,SO 9 | S8,21,SO 10 | S9,21,SR 11 | S10,22,SR 12 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/12.out: -------------------------------------------------------------------------------- 1 | age,level 2 | 19,JR 3 | 20,SO 4 | 21,SO 5 | 22,SR 6 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/13-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P4 4 | S2,P2 5 | S2,P3 6 | S3,P5 7 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/13-2.txt: -------------------------------------------------------------------------------- 1 | P_id,P_name 2 | P1,PN1 3 | P2,PN2 4 | P3,PN3 5 | P4,PN4 6 | P5,PN5 7 | P6,PN6 8 | P7,PN7 9 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/13.out: -------------------------------------------------------------------------------- 1 | P_name 2 | PN1 3 | PN2 4 | PN3 5 | PN4 6 | PN5 7 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/14-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P2 4 | S2,P1 5 | S2,P2 6 | S2,P3 7 | S3,P3 8 | S4,P2 9 | S5,P1 10 | S5,P2 11 | S5,P3 12 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/14-2.txt: -------------------------------------------------------------------------------- 1 | P_id,color 2 | P1,red 3 | P2,green 4 | P3,yellow 5 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/14-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/14.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN2 3 | SN5 4 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/15-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P4 4 | S2,P1 5 | S2,P3 6 | S3,P1 7 | S4,P4 8 | S5,P4 9 | S5,P2 10 | S5,P1 11 | S6,P5 12 | S7,P6 13 | S8,P4 14 | S8,P1 15 | S8,P6 16 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/15-2.txt: -------------------------------------------------------------------------------- 1 | P_id,color 2 | P1,red 3 | P2,green 4 | P3,yellow 5 | P4,red 6 | P5,green 7 | P6,yellow 8 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/15-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | S6,SN6 8 | S7,SN7 9 | S8,SN8 10 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/15.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN5 4 | SN8 5 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/16-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S2,P1 4 | S1,P2 5 | S2,P2 6 | S3,P2 7 | S3,P3 8 | S1,P4 9 | S3,P3 10 | S2,P5 11 | S3,P5 12 | S3,P6 13 | S1,P7 14 | S2,P8 15 | S4,P9 16 | S3,P9 17 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/16-2.txt: -------------------------------------------------------------------------------- 1 | P_id,P_name 2 | P1,PN1 3 | P2,PN2 4 | P3,PN3 5 | P4,PN4 6 | P5,PN5 7 | P6,PN6 8 | P7,PN7 9 | P8,PN8 10 | P9,PN9 11 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/16-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,AWS 5 | S4,AWS 6 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/16.out: -------------------------------------------------------------------------------- 1 | P_name 2 | PN3 3 | PN6 4 | PN9 5 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/17-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id,cost 2 | S1,P1,4 3 | S2,P1,2 4 | S1,P2,4 5 | S2,P2,2 6 | S3,P2,3 7 | S3,P3,4 8 | S1,P4,2 9 | S4,P3,6 10 | S2,P5,4 11 | S3,P5,2 12 | S3,P6,4 13 | S1,P7,2 14 | S2,P8,4 15 | S4,P9,4 16 | S3,P9,6 17 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/17-2.txt: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN1 3 | P2,SN1 4 | P3,SN4 5 | P5,SN2 6 | P9,SN3 7 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/17-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/17.out: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN1 3 | P2,SN1 4 | P3,SN4 5 | P5,SN2 6 | P9,SN3 7 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/18-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id,cost 2 | S1,P1,1 3 | S2,P1,2 4 | S1,P2,3 5 | S2,P2,2 6 | S3,P2,2 7 | S3,P3,4 8 | S1,P4,2 9 | S4,P3,5 10 | S2,P5,1 11 | S3,P5,2 12 | S3,P6,3 13 | S1,P7,2 14 | S2,P8,4 15 | S4,P9,4 16 | S3,P9,5 17 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/18-2.txt: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN1 3 | P2,SN1 4 | P3,SN4 5 | P5,SN2 6 | P9,SN3 7 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/18-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/18.out: -------------------------------------------------------------------------------- 1 | P_id,S_name 2 | P1,SN2 3 | P2,SN1 4 | P4,SN1 5 | P3,SN4 6 | P5,SN3 7 | P6,SN3 8 | P7,SN1 9 | P8,SN2 10 | P9,SN3 11 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/19-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P4 4 | S2,P1 5 | S2,P3 6 | S3,P1 7 | S4,P4 8 | S5,P4 9 | S5,P2 10 | S6,P5 11 | S7,P6 12 | S8,P4 13 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/19-2.txt: -------------------------------------------------------------------------------- 1 | P_id,color 2 | P1,red 3 | P2,green 4 | P3,yellow 5 | P4,red 6 | P5,green 7 | P6,yellow 8 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/19-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | S6,SN6 8 | S7,SN7 9 | S8,SN8 10 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/19.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN1 4 | SN3 5 | SN4 6 | SN8 7 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/2-1.txt: -------------------------------------------------------------------------------- 1 | C_name,F_key 2 | class1,f1 3 | class2,f2 4 | class3,f1 5 | class4,f3 6 | class5,f4 7 | class6,f1 8 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/2-2.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class2 3 | S2,class1 4 | S3,class2 5 | S3,class5 6 | S4,class2 7 | S4,class4 8 | S5,class4 9 | S6,class3 10 | S6,class2 11 | S7,class5 12 | S7,class1 13 | S8,class4 14 | S9,class5 15 | S9,class2 16 | S10,class5 17 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/2-3.txt: -------------------------------------------------------------------------------- 1 | F_key,F_name 2 | f1,faculty1 3 | f2,faculty2 4 | f3,faculty3 5 | f4,faculty4 6 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/2-4.txt: -------------------------------------------------------------------------------- 1 | S_key,major,age 2 | S1,History,20 3 | S2,Computer,21 4 | S3,Computer,23 5 | S4,Math,18 6 | S5,History,22 7 | S6,Math,22 8 | S7,English,21 9 | S8,English,23 10 | S9,History,21 11 | S10,History,22 12 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/2.out: -------------------------------------------------------------------------------- 1 | maxage 2 | 22 3 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/20-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P4 4 | S1,P2 5 | S2,P2 6 | S2,P3 7 | S3,P5 8 | S4,P3 9 | S4,P6 10 | S5,P4 11 | S5,P2 12 | S6,P4 13 | S7,P6 14 | S8,P5 15 | S8,P2 16 | S9,P1 17 | S9,P2 18 | S9,P6 19 | S10,P6 20 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/20-2.txt: -------------------------------------------------------------------------------- 1 | P_id,color 2 | P1,red 3 | P2,green 4 | P3,yellow 5 | P4,red 6 | P5,green 7 | P6,blue 8 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/20-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | S6,SN6 8 | S7,SN7 9 | S8,SN8 10 | S9,SN9 11 | S10,SN10 12 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/20.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN5 4 | SN9 5 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/21-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P4 4 | S2,P2 5 | S2,P3 6 | S3,P5 7 | S4,P3 8 | S4,P6 9 | S5,P4 10 | S5,P2 11 | S6,P4 12 | S7,P6 13 | S8,P5 14 | S8,P2 15 | S9,P1 16 | S10,P6 17 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/21-2.txt: -------------------------------------------------------------------------------- 1 | P_id,color 2 | P1,red 3 | P2,green 4 | P3,yellow 5 | P4,red 6 | P5,green 7 | P6,blue 8 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/21-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | S6,SN6 8 | S7,SN7 9 | S8,SN8 10 | S9,SN9 11 | S10,SN10 12 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/21.out: -------------------------------------------------------------------------------- 1 | S_name 2 | SN1 3 | SN9 4 | SN2 5 | SN5 6 | SN8 7 | SN6 8 | SN3 9 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/22-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id 2 | S1,P1 3 | S1,P4 4 | S2,P2 5 | S2,P3 6 | S3,P5 7 | S4,P3 8 | S4,P6 9 | S5,P4 10 | S5,P2 11 | S6,P4 12 | S7,P6 13 | S8,P5 14 | S8,P2 15 | S9,P1 16 | S10,P6 17 | S11,P2 18 | S11,P7 19 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/22-2.txt: -------------------------------------------------------------------------------- 1 | P_id,color 2 | P1,red 3 | P2,green 4 | P3,yellow 5 | P4,red 6 | P5,green 7 | P6,blue 8 | P7,green 9 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/22-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | S6,SN6 8 | S7,SN7 9 | S8,SN8 10 | S9,SN9 11 | S10,SN10 12 | S11,SN11 13 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/22.out: -------------------------------------------------------------------------------- 1 | S_name,n 2 | SN11,2 3 | SN11,2 4 | SN3,1 5 | SN8,2 6 | SN8,2 7 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/23-1.txt: -------------------------------------------------------------------------------- 1 | S_key,P_id,cost 2 | S1,P1,2 3 | S1,P2,1 4 | S1,P3,3 5 | S2,P2,2 6 | S2,P4,3 7 | S2,P5,1 8 | S2,P6,2 9 | S3,P2,2 10 | S3,P6,4 11 | S4,P1,3 12 | S4,P2,4 13 | S4,P3,6 14 | S4,P5,2 15 | S5,P1,4 16 | S5,P3,5 17 | S5,P5,1 18 | S5,P6,2 19 | S6,P2,4 20 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/23-2.txt: -------------------------------------------------------------------------------- 1 | P_id,color,P_name 2 | P1,yellow,PN1 3 | P2,green,PN2 4 | P3,red,PN3 5 | P4,green,PN4 6 | P5,yellow,PN5 7 | P6,red,PN6 8 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/23-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,SN1 3 | S2,SN2 4 | S3,SN3 5 | S4,SN4 6 | S5,SN5 7 | S6,SN6 8 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/23.out: -------------------------------------------------------------------------------- 1 | S_name,P_name,n 2 | 1,SN1,PN3,3 3 | 2,SN2,PN4,3 4 | 3,SN3,PN6,4 5 | 4,SN4,PN3,6 6 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/24.out: -------------------------------------------------------------------------------- 1 | aname 2 | Boeing 747-400 3 | Boeing 737-800 4 | Airbus A340-300 5 | British Aerospace Jetstream 41 6 | Embraer ERJ-145 7 | SAAB 340 8 | Piper Archer III 9 | Tupolev 154 10 | Lockheed L1011 11 | Boeing 757-300 12 | Boeing 777-300 13 | Boeing 767-400ER 14 | Airbus A320 15 | Airbus A319 16 | Boeing 727 17 | 18 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/25.out: -------------------------------------------------------------------------------- 1 | eid,maxcrusingrange 2 | 142519864,8430 3 | 269734834,8430 4 | 567354612,8430 5 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/26.out: -------------------------------------------------------------------------------- 1 | ename 2 | Milo Brooks 3 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/27.out: -------------------------------------------------------------------------------- 1 | aname,meansalary 2 | Boeing 747-400,244776.7500 3 | Boeing 737-800,191700.2500 4 | Airbus A340-300,217597.6667 5 | British Aerospace Jetstream 41,220251.3333 6 | Embraer ERJ-145,182838.2000 7 | SAAB 340,118113.5000 8 | Tupolev 154,205001.2500 9 | Lockheed L1011,242685.7500 10 | Boeing 757-300,189508.5714 11 | Boeing 777-300,257973.3333 12 | Boeing 767-400ER,209557.0000 13 | Airbus A320,243198.3333 14 | Airbus A319,201283.6667 15 | Boeing 727,273215.5000 16 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/28.out: -------------------------------------------------------------------------------- 1 | ename 2 | Betty Adams 3 | George Wright 4 | Karen Scott 5 | Lisa Walker 6 | John Williams 7 | Mary Johnson 8 | James Smith 9 | Larry West 10 | Mark Young 11 | Michael Miller 12 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/29.out: -------------------------------------------------------------------------------- 1 | aid 2 | 1 3 | 2 4 | 3 5 | 6 6 | 8 7 | 9 8 | 10 9 | 11 10 | 12 11 | 13 12 | 14 13 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/3-1.txt: -------------------------------------------------------------------------------- 1 | ID_key,Room 2 | C1,R102 3 | C2,R120 4 | C3,R128 5 | C4,R127 6 | C5,R131 7 | C6,R128 8 | C7,R130 9 | C8,R130 10 | C9,R128 11 | C10,R102 12 | C11,R120 13 | C12,R131 14 | C13,R127 15 | C14,R131 16 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/3-2.txt: -------------------------------------------------------------------------------- 1 | ID_key_student,ID_key 2 | S1,C1 3 | S1,C2 4 | S2,C1 5 | S2,C3 6 | S2,C4 7 | S3,C2 8 | S3,C4 9 | S4,C1 10 | S4,C5 11 | S5,C5 12 | S6,C1 13 | S6,C5 14 | S7,C2 15 | S7,C3 16 | S7,C5 17 | S8,C1 18 | S9,C5 19 | S10,C5 20 | S10,C6 21 | S9,C7 22 | S8,C8 23 | S8,C9 24 | S10,C10 25 | S1,C11 26 | S2,C11 27 | S3,C11 28 | S4,C11 29 | S5,C11 30 | S7,C12 31 | S8,C12 32 | S7,C13 33 | S1,C13 34 | S2,C13 35 | S4,C13 36 | S9,C14 37 | S10,C14 38 | S5,C14 39 | S6,C14 40 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/3.out: -------------------------------------------------------------------------------- 1 | ID_key 2 | C1 3 | C11 4 | C3 5 | C5 6 | C6 7 | C9 8 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/30.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/squares-sql/SQUARES/68d1cdea5f4e42aae7eb665811c2d6c8224ec7b0/tests-examples/textbook/tables/30.out -------------------------------------------------------------------------------- /tests-examples/textbook/tables/4-1.txt: -------------------------------------------------------------------------------- 1 | C_name,meets_at 2 | class1,mon 3 | class2,mon 4 | class3,tue 5 | class4,tue 6 | class5,fri 7 | class6,fri 8 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/4-2.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class1 3 | S1,class2 4 | S1,class3 5 | S2,class1 6 | S3,class2 7 | S3,class5 8 | S3,class4 9 | S4,class2 10 | S4,class4 11 | S5,class3 12 | S6,class3 13 | S6,class4 14 | S7,class1 15 | S7,class3 16 | S7,class5 17 | S8,class4 18 | S9,class5 19 | S9,class6 20 | S10,class4 21 | S10,class5 22 | S10,class6 23 | S11,class3 24 | S11,class6 25 | S12,class1 26 | S12,class2 27 | S13,class3 28 | S13,class4 29 | S14,class5 30 | S14,class6 31 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/4-3.txt: -------------------------------------------------------------------------------- 1 | S_key,S_name 2 | S1,stu1 3 | S2,stu2 4 | S3,stu3 5 | S4,stu4 6 | S5,stu5 7 | S6,stu6 8 | S7,stu7 9 | S8,stu8 10 | S9,stu9 11 | S10,stu10 12 | S11,stu11 13 | S12,stu12 14 | S13,stu13 15 | S14,stu14 16 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/4.out: -------------------------------------------------------------------------------- 1 | S_name 2 | stu1 3 | stu10 4 | stu12 5 | stu13 6 | stu14 7 | stu6 8 | stu9 9 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/5-1.txt: -------------------------------------------------------------------------------- 1 | C_name,F_key,Room 2 | C1,F1,R101 3 | C2,F1,R102 4 | C3,F1,R103 5 | C4,F2,R103 6 | C5,F3,R101 7 | C6,F4,R101 8 | C7,F2,R101 9 | C8,F4,R102 10 | C9,F4,R103 11 | C10,F5,R101 12 | C11,F5,R102 13 | C12,F5,R103 14 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/5-2.txt: -------------------------------------------------------------------------------- 1 | F_key,F_name 2 | F1,teach1 3 | F2,teach2 4 | F3,teach3 5 | F4,teach4 6 | F5,teach5 7 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/5.out: -------------------------------------------------------------------------------- 1 | F_name 2 | teach1 3 | teach4 4 | teach5 5 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/6-1.txt: -------------------------------------------------------------------------------- 1 | S_key,C_name 2 | S1,class1 3 | S1,class2 4 | S1,class3 5 | S2,class1 6 | S2,class4 7 | S2,class7 8 | S3,class2 9 | S3,class4 10 | S3,class5 11 | S4,class1 12 | S4,class2 13 | S4,class4 14 | S4,class5 15 | S5,class3 16 | S5,class4 17 | S5,class6 18 | S5,class7 19 | S6,class3 20 | S6,class4 21 | S6,class9 22 | S7,class1 23 | S7,class3 24 | S7,class5 25 | S7,class6 26 | S8,class2 27 | S8,class3 28 | S8,class4 29 | S8,class5 30 | S8,class6 31 | S8,class8 32 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/6-2.txt: -------------------------------------------------------------------------------- 1 | C_name,F_key 2 | class1,f1 3 | class2,f2 4 | class3,f2 5 | class4,f3 6 | class5,f3 7 | class6,f3 8 | class7,f4 9 | class8,f4 10 | class9,f1 11 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/6-3.txt: -------------------------------------------------------------------------------- 1 | F_key,F_name 2 | f1,faculty1 3 | f2,faculty2 4 | f3,faculty3 5 | f4,faculty4 6 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/6.out: -------------------------------------------------------------------------------- 1 | F_name 2 | faculty1 3 | faculty4 4 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/7-1.txt: -------------------------------------------------------------------------------- 1 | S_key,level,age 2 | S1,JR,18 3 | S2,SR,24 4 | S3,JR,21 5 | S4,SR,22 6 | S5,JR,18 7 | S6,SO,20 8 | S7,SO,22 9 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/7.out: -------------------------------------------------------------------------------- 1 | level,meanage 2 | JR,19 3 | SO,21 4 | SR,23 5 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/8-1.txt: -------------------------------------------------------------------------------- 1 | S_key,level,age 2 | S1,JR,18 3 | S2,SR,24 4 | S3,JR,21 5 | S4,SR,22 6 | S5,JR,18 7 | S6,SO,20 8 | S7,SO,22 9 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/8.out: -------------------------------------------------------------------------------- 1 | level,meanage 2 | SO,21 3 | SR,23 4 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/9-1.txt: -------------------------------------------------------------------------------- 1 | ID_class,ID_key,Room 2 | C1,F1,R101 3 | C2,F1,R128 4 | C3,F1,R103 5 | C4,F2,R103 6 | C5,F3,R101 7 | C6,F4,R128 8 | C7,F2,R101 9 | C9,F5,R128 10 | C10,F6,R102 11 | C11,F7,R128 12 | C12,F7,R103 13 | C13,F8,R102 14 | C14,F8,R128 15 | C15,F8,R128 16 | C16,F4,R128 17 | C17,F5,R128 18 | C18,F5,R128 19 | C19,F9,R128 20 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/9-2.txt: -------------------------------------------------------------------------------- 1 | ID_key,F_name 2 | F1,teach1 3 | F2,teach2 4 | F3,teach3 5 | F4,teach4 6 | F5,teach5 7 | F6,teach6 8 | F7,teach7 9 | F8,teach8 10 | F9,teach9 11 | -------------------------------------------------------------------------------- /tests-examples/textbook/tables/9.out: -------------------------------------------------------------------------------- 1 | F_name,n 2 | teach4,2 3 | teach5,3 4 | teach9,1 5 | -------------------------------------------------------------------------------- /tyrell/__init__.py: -------------------------------------------------------------------------------- 1 | from . import logger 2 | from . import visitor 3 | from . import spec 4 | from . import dsl 5 | from . import interpreter 6 | from . import enumerator 7 | from . import decider 8 | from . import synthesizer 9 | -------------------------------------------------------------------------------- /tyrell/decider/__init__.py: -------------------------------------------------------------------------------- 1 | from .result import ok, bad 2 | from .blame import Blame 3 | from .decider import Decider 4 | from .example_base import Example, ExampleDecider 5 | from .example_constraint import ExampleConstraintDecider 6 | from .example_constraint_pruning import ExampleConstraintPruningDecider 7 | -------------------------------------------------------------------------------- /tyrell/dsl/__init__.py: -------------------------------------------------------------------------------- 1 | from .node import Node, AtomNode, ParamNode, ApplyNode 2 | from .builder import Builder 3 | from .iterator import bfs, dfs 4 | from .indexer import NodeIndexer 5 | from .parent_finder import ParentFinder 6 | -------------------------------------------------------------------------------- /tyrell/enumerator/__init__.py: -------------------------------------------------------------------------------- 1 | from .enumerator import Enumerator 2 | from .smt import SmtEnumerator 3 | from .random import RandomEnumerator 4 | from .exhaustive import ExhaustiveEnumerator 5 | from .from_iterator import FromIteratorEnumerator, make_empty_enumerator, make_singleton_enumerator, make_list_enumerator 6 | from .lines import LinesEnumerator -------------------------------------------------------------------------------- /tyrell/enumerator/lattices/loc-3: -------------------------------------------------------------------------------- 1 | 3210000: 2 | 3200100:[x_2 = 1, x_1 = 2] 3 | 3100200:[x_2 = 1, x_1 = 2] 4 | -------------------------------------------------------------------------------- /tyrell/enumerator/lattices/loc-7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/squares-sql/SQUARES/68d1cdea5f4e42aae7eb665811c2d6c8224ec7b0/tyrell/enumerator/lattices/loc-7 -------------------------------------------------------------------------------- /tyrell/interpreter/__init__.py: -------------------------------------------------------------------------------- 1 | from .interpreter import Interpreter 2 | from .post_order import PostOrderInterpreter 3 | from .context import Context 4 | from .error import InterpreterError, GeneralError, AssertionViolation 5 | -------------------------------------------------------------------------------- /tyrell/spec/__init__.py: -------------------------------------------------------------------------------- 1 | from .parser import LarkError as ParseError 2 | from .type import Type, EnumType, ValueType 3 | from .production import Production, EnumProduction, ParamProduction, FunctionProduction 4 | from .predicate import Predicate 5 | from .spec import TypeSpec, ProductionSpec, ProgramSpec, TyrellSpec 6 | from .desugar import ParseTreeProcessingError 7 | from . import expr 8 | from .do_parse import parse, parse_file 9 | -------------------------------------------------------------------------------- /tyrell/spec/util.py: -------------------------------------------------------------------------------- 1 | from itertools import combinations, chain 2 | 3 | 4 | def enum_set_domain(elem_domain, max_len): 5 | itr = chain.from_iterable( 6 | [combinations(elem_domain, x) for x in range(1, max_len + 1)]) 7 | return [list(x) for x in itr] 8 | -------------------------------------------------------------------------------- /tyrell/synthesizer/__init__.py: -------------------------------------------------------------------------------- 1 | from .synthesizer import Synthesizer 2 | -------------------------------------------------------------------------------- /users/files/f1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/squares-sql/SQUARES/68d1cdea5f4e42aae7eb665811c2d6c8224ec7b0/users/files/f1 -------------------------------------------------------------------------------- /users/tables/o1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/squares-sql/SQUARES/68d1cdea5f4e42aae7eb665811c2d6c8224ec7b0/users/tables/o1 --------------------------------------------------------------------------------