Commits

Clark C. Evans committed f9e6eeb

demo database - moving arthist dept to la; this gives us
a school with 1 department

Comments (0)

Files changed (8)

test/input/translation.yaml

     - uri: /department{code,count(course{credits=3})}
     - uri: /department{code,count(course?credits=3)}
     - uri: /school{code,count(department.course{credits=3})}
-    - uri: /school{code}?count(department.course{credits=3})=61
+    - uri: /school{code}?count(department.course{credits=3})=75
     - uri: /department?exists(course.credits=6)
     - uri: /department?every(course.credits=6)
     - uri: /department{code,min(course.credits),max(course.credits)}

test/output/mssql.yaml

              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
           - [Content-Type, text/plain; charset=UTF-8]
           - [Vary, Accept]
           body: |2
-             | department                         |
-             +--------+-------------+-------------+
-             | code   | name        | school_code |
-            -+--------+-------------+-------------+-
-             | arthis | Art History | art         |
-             | stdart | Studio Art  | art         |
+             | department                        |
+             +--------+------------+-------------+
+             | code   | name       | school_code |
+            -+--------+------------+-------------+-
+             | stdart | Studio Art | art         |
 
              ----
              /(school?code='art').department
              +-------------------------------+-------------------+
              | name                          | count(department) |
             -+-------------------------------+-------------------+-
-             | School of Art & Design        |                 2 |
+             | School of Art & Design        |                 1 |
              | School of Business            |                 3 |
              | College of Education          |                 2 |
              | School of Engineering         |                 4 |
-             | School of Arts and Humanities |                 5 |
+             | School of Arts and Humanities |                 6 |
              | School of Music & Dance       |                 4 |
              | School of Natural Sciences    |                 4 |
              | Public Honorariums            |                 0 |
              +-------------------------------+------------+
              | name                          | # of Dept. |
             -+-------------------------------+------------+-
-             | School of Art & Design        |          2 |
+             | School of Art & Design        |          1 |
              | School of Business            |          3 |
              | College of Education          |          2 |
              | School of Engineering         |          4 |
-             | School of Arts and Humanities |          5 |
+             | School of Arts and Humanities |          6 |
              | School of Music & Dance       |          4 |
              | School of Natural Sciences    |          4 |
              | Public Honorariums            |          0 |
              | School of Business            | Accounting             | Audit                            |
              | School of Business            | Accounting             | Advanced Accounting              |
              | School of Business            | Accounting             | Accounting Internship            |
-             | School of Art & Design        | Art History            | History of Art Criticism I       |
-             | School of Art & Design        | Art History            | History of Art Criticism II      |
-             | School of Art & Design        | Art History            | North American Native Art        |
-             | School of Art & Design        | Art History            | Antique Art: Greece and Rome     |
-             | School of Art & Design        | Art History            | Antique Art: The Middle East     |
-             | School of Art & Design        | Art History            | Arts of Asia                     |
-             | School of Art & Design        | Art History            | Medieval Christian Art           |
-             | School of Art & Design        | Art History            | Asian Architecture               |
-             | School of Art & Design        | Art History            | Italian Renaissance Art          |
-             | School of Art & Design        | Art History            | Dutch and Flemish Painting       |
-             | School of Art & Design        | Art History            | Impressionism                    |
-             | School of Art & Design        | Art History            | Modernism                        |
-             | School of Art & Design        | Art History            | Postmodernism                    |
-             | School of Art & Design        | Art History            | Islamic Art                      |
-             | School of Art & Design        | Art History            | Art of Photography               |
-             | School of Art & Design        | Art History            | Industrial Architecture          |
-             | School of Art & Design        | Art History            | Contemporary Latin American Art  |
-             | School of Art & Design        | Art History            | Methods in Art History           |
-             | School of Art & Design        | Art History            | Museum and Gallery Management    |
-             | School of Art & Design        | Art History            | Materials and Construction in    |
+             | School of Arts and Humanities | Art History            | History of Art Criticism I       |
+             | School of Arts and Humanities | Art History            | History of Art Criticism II      |
+             | School of Arts and Humanities | Art History            | North American Native Art        |
+             | School of Arts and Humanities | Art History            | Antique Art: Greece and Rome     |
+             | School of Arts and Humanities | Art History            | Antique Art: The Middle East     |
+             | School of Arts and Humanities | Art History            | Arts of Asia                     |
+             | School of Arts and Humanities | Art History            | Medieval Christian Art           |
+             | School of Arts and Humanities | Art History            | Asian Architecture               |
+             | School of Arts and Humanities | Art History            | Italian Renaissance Art          |
+             | School of Arts and Humanities | Art History            | Dutch and Flemish Painting       |
+             | School of Arts and Humanities | Art History            | Impressionism                    |
+             | School of Arts and Humanities | Art History            | Modernism                        |
+             | School of Arts and Humanities | Art History            | Postmodernism                    |
+             | School of Arts and Humanities | Art History            | Islamic Art                      |
+             | School of Arts and Humanities | Art History            | Art of Photography               |
+             | School of Arts and Humanities | Art History            | Industrial Architecture          |
+             | School of Arts and Humanities | Art History            | Contemporary Latin American Art  |
+             | School of Arts and Humanities | Art History            | Methods in Art History           |
+             | School of Arts and Humanities | Art History            | Museum and Gallery Management    |
+             | School of Arts and Humanities | Art History            | Materials and Construction in    |
              :                               :                        : European Art                     :
              | School of Natural Sciences    | Astronomy              | General Astronomy I              |
              | School of Natural Sciences    | Astronomy              | General Astronomy I Lab          |
              | School of Business            | Accounting             | Audit                            |
              | School of Business            | Accounting             | Advanced Accounting              |
              | School of Business            | Accounting             | Accounting Internship            |
-             | School of Art & Design        | Art History            | History of Art Criticism I       |
-             | School of Art & Design        | Art History            | History of Art Criticism II      |
-             | School of Art & Design        | Art History            | North American Native Art        |
-             | School of Art & Design        | Art History            | Antique Art: Greece and Rome     |
-             | School of Art & Design        | Art History            | Antique Art: The Middle East     |
-             | School of Art & Design        | Art History            | Arts of Asia                     |
-             | School of Art & Design        | Art History            | Medieval Christian Art           |
-             | School of Art & Design        | Art History            | Asian Architecture               |
-             | School of Art & Design        | Art History            | Italian Renaissance Art          |
-             | School of Art & Design        | Art History            | Dutch and Flemish Painting       |
-             | School of Art & Design        | Art History            | Impressionism                    |
-             | School of Art & Design        | Art History            | Modernism                        |
-             | School of Art & Design        | Art History            | Postmodernism                    |
-             | School of Art & Design        | Art History            | Islamic Art                      |
-             | School of Art & Design        | Art History            | Art of Photography               |
-             | School of Art & Design        | Art History            | Industrial Architecture          |
-             | School of Art & Design        | Art History            | Contemporary Latin American Art  |
-             | School of Art & Design        | Art History            | Methods in Art History           |
-             | School of Art & Design        | Art History            | Museum and Gallery Management    |
-             | School of Art & Design        | Art History            | Materials and Construction in    |
+             | School of Arts and Humanities | Art History            | History of Art Criticism I       |
+             | School of Arts and Humanities | Art History            | History of Art Criticism II      |
+             | School of Arts and Humanities | Art History            | North American Native Art        |
+             | School of Arts and Humanities | Art History            | Antique Art: Greece and Rome     |
+             | School of Arts and Humanities | Art History            | Antique Art: The Middle East     |
+             | School of Arts and Humanities | Art History            | Arts of Asia                     |
+             | School of Arts and Humanities | Art History            | Medieval Christian Art           |
+             | School of Arts and Humanities | Art History            | Asian Architecture               |
+             | School of Arts and Humanities | Art History            | Italian Renaissance Art          |
+             | School of Arts and Humanities | Art History            | Dutch and Flemish Painting       |
+             | School of Arts and Humanities | Art History            | Impressionism                    |
+             | School of Arts and Humanities | Art History            | Modernism                        |
+             | School of Arts and Humanities | Art History            | Postmodernism                    |
+             | School of Arts and Humanities | Art History            | Islamic Art                      |
+             | School of Arts and Humanities | Art History            | Art of Photography               |
+             | School of Arts and Humanities | Art History            | Industrial Architecture          |
+             | School of Arts and Humanities | Art History            | Contemporary Latin American Art  |
+             | School of Arts and Humanities | Art History            | Methods in Art History           |
+             | School of Arts and Humanities | Art History            | Museum and Gallery Management    |
+             | School of Arts and Humanities | Art History            | Materials and Construction in    |
              :                               :                        : European Art                     :
              | School of Natural Sciences    | Astronomy              | General Astronomy I              |
              | School of Natural Sciences    | Astronomy              | General Astronomy I Lab          |
              | code   | name                   | school_code | code | name                          | campus |
             -+--------+------------------------+-------------+------+-------------------------------+--------+-
              | acc    | Accounting             | bus         | bus  | School of Business            | south  |
-             | arthis | Art History            | art         | art  | School of Art & Design        | old    |
+             | arthis | Art History            | la          | la   | School of Arts and Humanities | old    |
              | astro  | Astronomy              | ns          | ns   | School of Natural Sciences    | old    |
              | be     | Bioengineering         | eng         | eng  | School of Engineering         | north  |
              | bursar | Bursar's Office        |             |      |                               |        |
           - [Content-Type, text/csv; charset=UTF-8]
           - [Content-Disposition, attachment; filename="department.csv"]
           body: "name,name,count(course)\r\nSchool of Arts and Humanities,English,21\r\nSchool
-            of Arts and Humanities,Foreign Languages,21\r\nSchool of Art & Design,Art
+            of Arts and Humanities,Foreign Languages,21\r\nSchool of Arts and Humanities,Art
             History,20\r\nSchool of Arts and Humanities,Political Science,19\r\nSchool
             of Art & Design,Studio Art,19\r\n"
       - id: relating-and-aggregating-data
              +-------------------------------+----------------+-------------------+
              | name                          | count(program) | count(department) |
             -+-------------------------------+----------------+-------------------+-
-             | School of Art & Design        |              3 |                 2 |
+             | School of Art & Design        |              3 |                 1 |
              | School of Business            |              6 |                 3 |
              | College of Education          |              7 |                 2 |
              | School of Engineering         |              8 |                 4 |
-             | School of Arts and Humanities |              9 |                 5 |
+             | School of Arts and Humanities |              9 |                 6 |
              | School of Music & Dance       |              0 |                 4 |
              | School of Natural Sciences    |              6 |                 4 |
              | Public Honorariums            |              1 |                 0 |
              +-------------------------------+-------------------------------+
              | name                          | avg(department.count(course)) |
             -+-------------------------------+-------------------------------+-
-             | School of Art & Design        |                     19.500000 |
+             | School of Art & Design        |                     19.000000 |
              | School of Business            |                     14.666666 |
              | College of Education          |                     17.500000 |
              | School of Engineering         |                     17.750000 |
-             | School of Arts and Humanities |                     19.000000 |
+             | School of Arts and Humanities |                     19.166666 |
              | School of Music & Dance       |                      0.000000 |
              | School of Natural Sciences    |                     18.500000 |
              | Public Honorariums            |                               |
              +-------------------------------+--------------------------------------------+
              | name                          | count(department?exists(course?credits>3)) |
             -+-------------------------------+--------------------------------------------+-
-             | School of Art & Design        |                                          2 |
+             | School of Art & Design        |                                          1 |
              | School of Business            |                                          3 |
              | College of Education          |                                          1 |
              | School of Engineering         |                                          4 |
-             | School of Arts and Humanities |                                          5 |
+             | School of Arts and Humanities |                                          6 |
              | School of Music & Dance       |                                          0 |
              | School of Natural Sciences    |                                          4 |
              | Public Honorariums            |                                          0 |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
              +--------+------------------------+-------------+
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
-             | arthis | Art History            | art         |
              | stdart | Studio Art             | art         |
              | acc    | Accounting             | bus         |
              | econ   | Economics              | bus         |
              | comp   | Computer Science       | eng         |
              | ee     | Electrical Engineering | eng         |
              | me     | Mechanical Engineering | eng         |
+             | arthis | Art History            | la          |
              | eng    | English                | la          |
              | hist   | History                | la          |
              | lang   | Foreign Languages      | la          |
              | name                          | count(department) |
             -+-------------------------------+-------------------+-
              | School of Engineering         |                 4 |
-             | School of Arts and Humanities |                 5 |
+             | School of Arts and Humanities |                 6 |
              | School of Music & Dance       |                 4 |
              | School of Natural Sciences    |                 4 |
 
              | name                          | num_dept |
             -+-------------------------------+----------+-
              | School of Engineering         |        4 |
-             | School of Arts and Humanities |        5 |
+             | School of Arts and Humanities |        6 |
              | School of Music & Dance       |        4 |
              | School of Natural Sciences    |        4 |
 
              | name                          | num_dept |
             -+-------------------------------+----------+-
              | School of Engineering         |        4 |
-             | School of Arts and Humanities |        5 |
+             | School of Arts and Humanities |        6 |
              | School of Music & Dance       |        4 |
              | School of Natural Sciences    |        4 |
 
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | chem   | Chemistry              | ns          |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | econ   | Economics              | bus         |
              | edpol  | Educational Policy     | edu         |
              | eng    | English                | la          |
              +--------+-------------------+-------------+
              | code   | name              | school_code |
             -+--------+-------------------+-------------+-
-             | arthis | Art History       | art         |
+             | arthis | Art History       | la          |
              | astro  | Astronomy         | ns          |
              | comp   | Computer Science  | eng         |
              | eng    | English           | la          |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
              | code   | code | boolean(school) |
             -+--------+------+-----------------+-
              | acc    | bus  | true            |
-             | arthis | art  | true            |
+             | arthis | la   | true            |
              | astro  | ns   | true            |
              | be     | eng  | true            |
              | bursar |      | false           |
              +--------+------------------------+-------------+
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
-             | arthis | Art History            | art         |
              | stdart | Studio Art             | art         |
              | acc    | Accounting             | bus         |
              | econ   | Economics              | bus         |
              | comp   | Computer Science       | eng         |
              | ee     | Electrical Engineering | eng         |
              | me     | Mechanical Engineering | eng         |
+             | arthis | Art History            | la          |
              | eng    | English                | la          |
              | hist   | History                | la          |
              | lang   | Foreign Languages      | la          |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
              | bus         | ubusad   | Bachelor of Business             | bs     |              |
              :             :          : Administration                   :        :              :
              | bus         | uecon    | Bachelor of Arts in Economics    | ba     | gecon        |
-             | art         | gart     | Post Baccalaureate in Art        | pb     |              |
-             :             :          : History                          :        :              :
-             | art         | uhist    | Bachelor of Arts in Art History  | ba     |              |
-             | art         | ustudio  | Bachelor of Arts in Studio Art   | ba     |              |
+             | la          | gengl    | Master of Arts in English        | ma     |              |
+             | la          | glang    | Master of Arts in Modern         | ma     |              |
+             :             :          : Languages                        :        :              :
+             | la          | gscitch  | Master of Arts in Science        | ma     |              |
+             :             :          : Teaching                         :        :              :
+             | la          | psciwri  | Science Writing                  | ct     |              |
+             | la          | uengl    | Bachelor of Arts in English      | ba     | gengl        |
+             | la          | uhist    | Bachelor of Arts in History      | ba     |              |
+             | la          | upolisci | Bachelor of Arts in Political    | ba     |              |
+             :             :          : Science                          :        :              :
+             | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
+             | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
              | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | chem   | Chemistry              | ns          |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
              | bursar | Bursar's Office        |             |
              | be     | Bioengineering         | eng         |
              | astro  | Astronomy              | ns          |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | acc    | Accounting             | bus         |
 
              ----
              | bursar | Bursar's Office        |             |
              | career | Career Development     |             |
              | parent | Parents & Alumni       |             |
-             | arthis | Art History            | art         |
              | stdart | Studio Art             | art         |
              | acc    | Accounting             | bus         |
              | econ   | Economics              | bus         |
              | comp   | Computer Science       | eng         |
              | ee     | Electrical Engineering | eng         |
              | me     | Mechanical Engineering | eng         |
+             | arthis | Art History            | la          |
              | eng    | English                | la          |
              | hist   | History                | la          |
              | lang   | Foreign Languages      | la          |
              | str    | Strings                | mus         |
              | voc    | Vocals                 | mus         |
              | win    | Wind                   | mus         |
+             | arthis | Art History            | la          |
              | eng    | English                | la          |
              | hist   | History                | la          |
              | lang   | Foreign Languages      | la          |
              | acc    | Accounting             | bus         |
              | econ   | Economics              | bus         |
              | mm     | Management & Marketing | bus         |
-             | arthis | Art History            | art         |
              | stdart | Studio Art             | art         |
              | bursar | Bursar's Office        |             |
              | career | Career Development     |             |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | chem   | Chemistry              | ns          |
              +--------+------------------------+-------------+
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
-             | arthis | Art History            | art         |
              | stdart | Studio Art             | art         |
              | acc    | Accounting             | bus         |
              | econ   | Economics              | bus         |
              | comp   | Computer Science       | eng         |
              | ee     | Electrical Engineering | eng         |
              | me     | Mechanical Engineering | eng         |
+             | arthis | Art History            | la          |
              | eng    | English                | la          |
              | hist   | History                | la          |
              | lang   | Foreign Languages      | la          |
              | name                          | name                   |
             -+-------------------------------+------------------------+-
              | School of Business            | Accounting             |
-             | School of Art & Design        | Art History            |
+             | School of Arts and Humanities | Art History            |
              | School of Natural Sciences    | Astronomy              |
              | School of Engineering         | Bioengineering         |
              |                               | Bursar's Office        |
              | code | name                          | campus | code   | name                   | school_code |
             -+------+-------------------------------+--------+--------+------------------------+-------------+-
              | bus  | School of Business            | south  | acc    | Accounting             | bus         |
-             | art  | School of Art & Design        | old    | arthis | Art History            | art         |
+             | la   | School of Arts and Humanities | old    | arthis | Art History            | la          |
              | ns   | School of Natural Sciences    | old    | astro  | Astronomy              | ns          |
              | eng  | School of Engineering         | north  | be     | Bioengineering         | eng         |
              |      |                               |        | bursar | Bursar's Office        |             |
              +-------------------------------+------------------+
              | Name                          | # of Departments |
             -+-------------------------------+------------------+-
-             | School of Art & Design        |                2 |
+             | School of Art & Design        |                1 |
              | School of Business            |                3 |
              | College of Education          |                2 |
              | School of Engineering         |                4 |
-             | School of Arts and Humanities |                5 |
+             | School of Arts and Humanities |                6 |
              | School of Music & Dance       |                4 |
              | School of Natural Sciences    |                4 |
              | Public Honorariums            |                0 |
                +--------+-------------------+-------------+
                | code   | name              | school_code |
               -+--------+-------------------+-------------+-
-               | arthis | Art History       | art         |
+               | arthis | Art History       | la          |
                | eng    | English           | la          |
                | hist   | History           | la          |
                | lang   | Foreign Languages | la          |
                | code   | name                   | school_code |
               -+--------+------------------------+-------------+-
                | acc    | Accounting             | bus         |
-               | arthis | Art History            | art         |
+               | arthis | Art History            | la          |
                | astro  | Astronomy              | ns          |
                | be     | Bioengineering         | eng         |
                | chem   | Chemistry              | ns          |
                +--------+-------------------+-------------+
                | code   | name              | school_code |
               -+--------+-------------------+-------------+-
-               | arthis | Art History       | art         |
+               | arthis | Art History       | la          |
                | eng    | English           | la          |
                | hist   | History           | la          |
                | lang   | Foreign Languages | la          |
                | code | name                          | campus | code   | name                   | school_code |
               -+------+-------------------------------+--------+--------+------------------------+-------------+-
                | bus  | School of Business            | south  | acc    | Accounting             | bus         |
-               | art  | School of Art & Design        | old    | arthis | Art History            | art         |
+               | la   | School of Arts and Humanities | old    | arthis | Art History            | la          |
                | ns   | School of Natural Sciences    | old    | astro  | Astronomy              | ns          |
                | eng  | School of Engineering         | north  | be     | Bioengineering         | eng         |
                |      |                               |        | bursar | Bursar's Office        |             |
                | school.name+' - '+name           |
               -+----------------------------------+-
                | School of Business - Accounting  |
-               | School of Art & Design - Art     |
-               : History                          :
+               | School of Arts and Humanities -  |
+               : Art History                      :
                | School of Natural Sciences -     |
                : Astronomy                        :
                | School of Engineering -          |
                | code | name                          | campus | code   | name                   | school_code |
               -+------+-------------------------------+--------+--------+------------------------+-------------+-
                | bus  | School of Business            | south  | acc    | Accounting             | bus         |
-               | art  | School of Art & Design        | old    | arthis | Art History            | art         |
+               | la   | School of Arts and Humanities | old    | arthis | Art History            | la          |
                | ns   | School of Natural Sciences    | old    | astro  | Astronomy              | ns          |
                | eng  | School of Engineering         | north  | be     | Bioengineering         | eng         |
                :      :                               :        | bursar | Bursar's Office        |             |
                +------+-------------------------------------+
                | code | count(department.course{credits=3}) |
               -+------+-------------------------------------+-
-               | art  |                                  19 |
+               | art  |                                   5 |
                | bus  |                                  32 |
                | edu  |                                  23 |
                | eng  |                                  51 |
-               | la   |                                  61 |
+               | la   |                                  75 |
                | mus  |                                   0 |
                | ns   |                                  34 |
                | ph   |                                   0 |
                                      GROUP BY [department].[school_code]) AS [course]
                                     ON ([school].[code] = [course].[school_code])
                ORDER BY 1 ASC
-          - uri: /school{code}?count(department.course{credits=3})=61
+          - uri: /school{code}?count(department.course{credits=3})=75
             status: 200 OK
             headers:
             - [Content-Type, text/plain; charset=UTF-8]
                | la     |
 
                ----
-               /school{code}?count(department.course{credits=3})=61
+               /school{code}?count(department.course{credits=3})=75
                SELECT [school].[code]
                FROM [ad].[school]
                     LEFT OUTER JOIN (SELECT COUNT(NULLIF((CASE WHEN ([course].[credits] = 3) THEN 1 WHEN NOT ([course].[credits] = 3) THEN 0 END), 0)) AS [count],
                                                      ON ([department].[code] = [course].[department_code])
                                      GROUP BY [department].[school_code]) AS [course]
                                     ON ([school].[code] = [course].[school_code])
-               WHERE (COALESCE([course].[count], 0) = 61)
+               WHERE (COALESCE([course].[count], 0) = 75)
                ORDER BY 1 ASC
           - uri: /department?exists(course.credits=6)
             status: 200 OK
                | code   | name              | school_code |
               -+--------+-------------------+-------------+-
                | acc    | Accounting        | bus         |
-               | arthis | Art History       | art         |
+               | arthis | Art History       | la          |
                | comp   | Computer Science  | eng         |
                | econ   | Economics         | bus         |
                | lang   | Foreign Languages | la          |
                | code   | name                   | school_code |
               -+--------+------------------------+-------------+-
                | acc    | Accounting             | bus         |
-               | arthis | Art History            | art         |
+               | arthis | Art History            | la          |
                | astro  | Astronomy              | ns          |
                | be     | Bioengineering         | eng         |
                | chem   | Chemistry              | ns          |
                +------+-------------------------------+--------+-------------------+
                | code | name                          | campus | count(department) |
               -+------+-------------------------------+--------+-------------------+-
-               | art  | School of Art & Design        | old    |                 2 |
+               | art  | School of Art & Design        | old    |                 1 |
                | bus  | School of Business            | south  |                 3 |
                | edu  | College of Education          | old    |                 2 |
                | eng  | School of Engineering         | north  |                 4 |
-               | la   | School of Arts and Humanities | old    |                 5 |
+               | la   | School of Arts and Humanities | old    |                 6 |
                | mus  | School of Music & Dance       | south  |                 4 |
                | ns   | School of Natural Sciences    | old    |                 4 |
                | ph   | Public Honorariums            |        |                 0 |
                +------+-------------------------------+--------+----------------------------------+
                | code | name                          | campus | count(department?exists(course)) |
               -+------+-------------------------------+--------+----------------------------------+-
-               | art  | School of Art & Design        | old    |                                2 |
+               | art  | School of Art & Design        | old    |                                1 |
                | bus  | School of Business            | south  |                                3 |
                | edu  | College of Education          | old    |                                2 |
                | eng  | School of Engineering         | north  |                                4 |
-               | la   | School of Arts and Humanities | old    |                                5 |
+               | la   | School of Arts and Humanities | old    |                                6 |
                | mus  | School of Music & Dance       | south  |                                0 |
                | ns   | School of Natural Sciences    | old    |                                4 |
                | ph   | Public Honorariums            |        |                                0 |
                +------+-------------------+----------------+
                | code | count(department) | count(program) |
               -+------+-------------------+----------------+-
-               | art  |                 2 |              3 |
+               | art  |                 1 |              3 |
                | bus  |                 3 |              6 |
                | edu  |                 2 |              7 |
                | eng  |                 4 |              8 |
-               | la   |                 5 |              9 |
+               | la   |                 6 |              9 |
                | mus  |                 4 |              0 |
                | ns   |                 4 |              6 |
                | ph   |                 0 |              1 |
                | code   | code | count(school.program) | count(program) |
               -+--------+------+-----------------------+----------------+-
                | acc    | bus  |                     6 |              6 |
-               | arthis | art  |                     3 |              3 |
+               | arthis | la   |                     9 |              9 |
                | astro  | ns   |                     6 |              6 |
                | be     | eng  |                     8 |              8 |
                | bursar |      |                     0 |                |
                | code   | code | exists(school.program) | exists(program) |
               -+--------+------+------------------------+-----------------+-
                | acc    | bus  | true                   | true            |
-               | arthis | art  | true                   | true            |
+               | arthis | la   | true                   | true            |
                | astro  | ns   | true                   | true            |
                | be     | eng  | true                   | true            |
                | bursar |      | false                  |                 |
                +---------------------------+
                | count(course.title~$code) |
               -+---------------------------+-
-               |                        13 |
+               |                         1 |
 
                ----
                /school.define($code:=code).department.limit(1){count(course.title~$code)}
                +------+-----------------------------+
                | code | count(department.limit(10)) |
               -+------+-----------------------------+-
-               | art  |                           2 |
+               | art  |                           1 |
 
                ----
                /school?code='art'{code,count(department.limit(10))}
                +------+-------------------+
                | code | count(department) |
               -+------+-------------------+-
-               | la   |                 5 |
+               | la   |                 6 |
 
                ----
                /school{code,count(department)}?count(department)=max(({}->school).count(department))
                |                               |                   +-------------------+
                | name                          | count(department) | count(department) |
               -+-------------------------------+-------------------+-------------------+-
-               | School of Art & Design        |                 2 |                   :
+               | School of Art & Design        |                 1 |                   :
                | School of Business            |                 3 |                 3 |
                | College of Education          |                 2 |                 2 |
                | School of Engineering         |                 4 |                 4 |
-               | School of Arts and Humanities |                 5 |                   :
+               | School of Arts and Humanities |                 6 |                   :
                | School of Music & Dance       |                 4 |                 4 |
                | School of Natural Sciences    |                 4 |                 4 |
                | Public Honorariums            |                 0 |                 0 |
                | code   | code   | code   |
               -+--------+--------+--------+-
                | acc    | bus    | bus    |
-               | arthis | art    |        :
+               | arthis | la     |        :
                | astro  | ns     | ns     |
                | bursar |        :        :
                | career |        :        :
             - [Vary, Accept]
             body: |2
                | department                                                                   |
-               +--------+-------------+-------------+-------+-------------------+-------------+
-               | code   | name        | school_code | code  | name              | school_code |
-              -+--------+-------------+-------------+-------+-------------------+-------------+-
-               | arthis | Art History | art         | eng   | English           | la          |
-               | arthis | Art History | art         | hist  | History           | la          |
-               | arthis | Art History | art         | lang  | Foreign Languages | la          |
-               | arthis | Art History | art         | poli  | Political Science | la          |
-               | arthis | Art History | art         | psych | Psychology        | la          |
-               | stdart | Studio Art  | art         | eng   | English           | la          |
-               | stdart | Studio Art  | art         | hist  | History           | la          |
-               | stdart | Studio Art  | art         | lang  | Foreign Languages | la          |
-               | stdart | Studio Art  | art         | poli  | Political Science | la          |
-               | stdart | Studio Art  | art         | psych | Psychology        | la          |
+               +--------+------------+-------------+--------+-------------------+-------------+
+               | code   | name       | school_code | code   | name              | school_code |
+              -+--------+------------+-------------+--------+-------------------+-------------+-
+               | stdart | Studio Art | art         | arthis | Art History       | la          |
+               | stdart | Studio Art | art         | eng    | English           | la          |
+               | stdart | Studio Art | art         | hist   | History           | la          |
+               | stdart | Studio Art | art         | lang   | Foreign Languages | la          |
+               | stdart | Studio Art | art         | poli   | Political Science | la          |
+               | stdart | Studio Art | art         | psych  | Psychology        | la          |
 
                ----
                /(department?school.code='art').home().(department?school.code='la'){root().(department?school.code='art').*,*}
               -+------+-------------------+-
                | bus  |                 3 |
                | eng  |                 4 |
-               | la   |                 5 |
+               | la   |                 6 |
                | mus  |                 4 |
                | ns   |                 4 |
 
                +--------+------------------------+-------------+
                | code   | name                   | school_code |
               -+--------+------------------------+-------------+-
-               | arthis | Art History            | art         |
                | stdart | Studio Art             | art         |
                | acc    | Accounting             | bus         |
                | econ   | Economics              | bus         |
                | comp   | Computer Science       | eng         |
                | ee     | Electrical Engineering | eng         |
                | me     | Mechanical Engineering | eng         |
+               | arthis | Art History            | la          |
                | eng    | English                | la          |
                | hist   | History                | la          |
                | lang   | Foreign Languages      | la          |
                +------+----------------------------+
                | code | count(moniker(department)) |
               -+------+----------------------------+-
-               | art  |                          2 |
+               | art  |                          1 |
                | bus  |                          3 |
                | edu  |                          2 |
                | eng  |                          4 |
-               | la   |                          5 |
+               | la   |                          6 |
                | mus  |                          4 |
                | ns   |                          4 |
                | ph   |                          0 |
                | code   | name                   | school_code |
               -+--------+------------------------+-------------+-
                | acc    | Accounting             | bus         |
-               | arthis | Art History            | art         |
+               | arthis | Art History            | la          |
                | astro  | Astronomy              | ns          |
                | be     | Bioengineering         | eng         |
                | bursar | Bursar's Office        |             |
                | voc    | Vocals                 | mus         |
                | win    | Wind                   | mus         |
                | acc    | Accounting             | bus         |
-               | arthis | Art History            | art         |
+               | arthis | Art History            | la          |
                | astro  | Astronomy              | ns          |
                | be     | Bioengineering         | eng         |
                | bursar | Bursar's Office        |             |
                | voc    | Vocals                 | mus         |
                | win    | Wind                   | mus         |
                | acc    | Accounting             | bus         |
-               | arthis | Art History            | art         |
+               | arthis | Art History            | la          |
                | astro  | Astronomy              | ns          |
                | be     | Bioengineering         | eng         |
                | bursar | Bursar's Office        |             |
                | voc    | Vocals                 | mus         |
                | win    | Wind                   | mus         |
                | acc    | Accounting             | bus         |
-               | arthis | Art History            | art         |
+               | arthis | Art History            | la          |
                | astro  | Astronomy              | ns          |
                | be     | Bioengineering         | eng         |
                | bursar | Bursar's Office        |             |
                | voc    | Vocals                 | mus         |
                | win    | Wind                   | mus         |
                | acc    | Accounting             | bus         |
-               | arthis | Art History            | art         |
+               | arthis | Art History            | la          |
                | astro  | Astronomy              | ns          |
                | be     | Bioengineering         | eng         |
                | bursar | Bursar's Office        |             |
                | voc    | Vocals                 | mus         |
                | win    | Wind                   | mus         |
                | acc    | Accounting             | bus         |
-               | arthis | Art History            | art         |
+               | arthis | Art History            | la          |
                | astro  | Astronomy              | ns          |
                | be     | Bioengineering         | eng         |
                | bursar | Bursar's Office        |             |
                | voc    | Vocals                 | mus         |
                | win    | Wind                   | mus         |
                | acc    | Accounting             | bus         |
-               | arthis | Art History            | art         |
+               | arthis | Art History            | la          |
                | astro  | Astronomy              | ns          |
                | be     | Bioengineering         | eng         |
                | bursar | Bursar's Office        |             |
                | voc    | Vocals                 | mus         |
                | win    | Wind                   | mus         |
                | acc    | Accounting             | bus         |
-               | arthis | Art History            | art         |
+               | arthis | Art History            | la          |
                | astro  | Astronomy              | ns          |
                | be     | Bioengineering         | eng         |
                | bursar | Bursar's Office        |             |
                | voc    | Vocals                 | mus         |
                | win    | Wind                   | mus         |
                | acc    | Accounting             | bus         |
-               | arthis | Art History            | art         |
+               | arthis | Art History            | la          |
                | astro  | Astronomy              | ns          |
                | be     | Bioengineering         | eng         |
                | bursar | Bursar's Office        |             |
             - [Content-Type, text/plain; charset=UTF-8]
             - [Vary, Accept]
             body: |2
-               | moniker(department)                |
-               +--------+-------------+-------------+
-               | code   | name        | school_code |
-              -+--------+-------------+-------------+-
-               | arthis | Art History | art         |
-               | stdart | Studio Art  | art         |
+               | moniker(department)               |
+               +--------+------------+-------------+
+               | code   | name       | school_code |
+              -+--------+------------+-------------+-
+               | stdart | Studio Art | art         |
 
                ----
                /(school?code='art').moniker(department)
                +------+----------------------------+
                | code | count(moniker(department)) |
               -+------+----------------------------+-
-               | art  |                          2 |
+               | art  |                          1 |
 
                ----
                /(school?code='art'){code,count(moniker(department))}
                | code   | name                   | school_code |
               -+--------+------------------------+-------------+-
                | acc    | Accounting             | bus         |
-               | arthis | Art History            | art         |
+               | arthis | Art History            | la          |
                | astro  | Astronomy              | ns          |
                | be     | Bioengineering         | eng         |
                | bursar | Bursar's Office        |             |
                +--------+------------------------+-------------+
                | code   | name                   | school_code |
               -+--------+------------------------+-------------+-
-               | arthis | Art History            | art         |
                | stdart | Studio Art             | art         |
                | acc    | Accounting             | bus         |
                | econ   | Economics              | bus         |
                | comp   | Computer Science       | eng         |
                | ee     | Electrical Engineering | eng         |
                | me     | Mechanical Engineering | eng         |
+               | arthis | Art History            | la          |
                | eng    | English                | la          |
                | hist   | History                | la          |
                | lang   | Foreign Languages      | la          |
                +--------+---------------+
                | code   | count(course) |
               -+--------+---------------+-
-               | arthis |            20 |
                | stdart |            19 |
 
                ----
                +------+--------------------------------------+----------------------------------------------------------+
                | code | count(code->department{school_code}) | avg((code->department{school_code}).sum(course.credits)) |
               -+------+--------------------------------------+----------------------------------------------------------+-
-               | art  |                                    2 |                                                69.000000 |
+               | art  |                                    1 |                                                68.000000 |
                | bus  |                                    3 |                                                50.666666 |
                | edu  |                                    2 |                                                60.500000 |
                | eng  |                                    4 |                                                56.250000 |
-               | la   |                                    5 |                                                64.600000 |
+               | la   |                                    6 |                                                65.500000 |
                | mus  |                                    4 |                                                 0.000000 |
                | ns   |                                    4 |                                                59.000000 |
                | ph   |                                    0 |                                                          |
                +------+--------------------------------------+----------------------------------------------------------+
                | code | count(code->department{school_code}) | avg((code->department{school_code}).sum(course.credits)) |
               -+------+--------------------------------------+----------------------------------------------------------+-
-               | art  |                                    2 |                                                69.000000 |
+               | art  |                                    1 |                                                68.000000 |
 
                ----
                /school{code,count(code->department{school_code}),avg((code->department{school_code}).sum(course.credits))}?code='art'
             - [Content-Type, text/plain; charset=UTF-8]
             - [Vary, Accept]
             body: |2
-               | department                         |
-               +--------+-------------+-------------+
-               | code   | name        | school_code |
-              -+--------+-------------+-------------+-
-               | arthis | Art History | art         |
-               | stdart | Studio Art  | art         |
+               | department                        |
+               +--------+------------+-------------+
+               | code   | name       | school_code |
+              -+--------+------------+-------------+-
+               | stdart | Studio Art | art         |
 
                ----
                /(school?code='art').department
                +------+--------+--------+--------+----------+
                | code | min(c) | max(c) | sum(c) | avg(c)   |
               -+------+--------+--------+--------+----------+-
-               | art  |      0 |      6 |    138 | 3.631578 |
+               | art  |      0 |      6 |     68 | 3.777777 |
                | bus  |      2 |      6 |    152 | 3.454545 |
                | edu  |      3 |      6 |    121 | 3.558823 |
                | eng  |      2 |      8 |    225 | 3.169014 |
-               | la   |      2 |      6 |    323 | 3.400000 |
+               | la   |      2 |      6 |    393 | 3.417391 |
                | ns   |      1 |      6 |    236 | 3.189189 |
 
                ----
                | code | num_dept |
               -+------+----------+-
                | eng  |        4 |
-               | la   |        5 |
+               | la   |        6 |
                | mus  |        4 |
                | ns   |        4 |
 
                | code | $num_dept |
               -+------+-----------+-
                | eng  |         4 |
-               | la   |         5 |
+               | la   |         6 |
                | mus  |         4 |
                | ns   |         4 |
 
                | ct             |
                | ma             |
                | ba             |
-               | pb             |
+               | ct             |
+               | ma             |
                | bs             |
                | ms             |
                | ph             |
               -+----------------+-
                | ba             |
                | pb             |
-               | ba             |
-               | pb             |
 
                ----
                /department.((school?code='art').program^degree)
                | art         | ustudio | Bachelor of Arts in Studio Art  | ba     |              |
                | art         | gart    | Post Baccalaureate in Art       | pb     |              |
                :             :         : History                         :        :              :
-               | art         | uhist   | Bachelor of Arts in Art History | ba     |              |
-               | art         | ustudio | Bachelor of Arts in Studio Art  | ba     |              |
-               | art         | gart    | Post Baccalaureate in Art       | pb     |              |
-               :             :         : History                         :        :              :
 
                ----
                /department.((school?code='art').program^degree).^
                |      +------------------------+----------------------------------+
                | code | name                   | title                            |
               -+------+------------------------+----------------------------------+-
-               | art  | Art History            | Post Baccalaureate in Art        |
-               :      | Studio Art             | History                          :
+               | art  | Studio Art             | Post Baccalaureate in Art        |
+               :      :                        : History                          :
                :      :                        | Bachelor of Arts in Art History  |
                :      :                        | Bachelor of Arts in Studio Art   |
                | bus  | Accounting             | Master of Arts in Economics      |
                :      :                        | B.S. in Computer Science         |
                :      :                        | B.S. in Electrical Engineering   |
                :      :                        | B.S. in Mechanical Engineering   |
-               | la   | English                | Master of Arts in English        |
-               :      | History                | Master of Arts in Modern         |
-               :      | Foreign Languages      | Languages                        :
-               :      | Political Science      | Master of Arts in Science        |
-               :      | Psychology             | Teaching                         :
-               :      :                        | Science Writing                  |
+               | la   | Art History            | Master of Arts in English        |
+               :      | English                | Master of Arts in Modern         |
+               :      | History                | Languages                        :
+               :      | Foreign Languages      | Master of Arts in Science        |
+               :      | Political Science      | Teaching                         :
+               :      | Psychology             | Science Writing                  |
                :      :                        | Bachelor of Arts in English      |
                :      :                        | Bachelor of Arts in History      |
                :      :                        | Bachelor of Arts in Political    |
             - [Content-Type, text/plain; charset=UTF-8]
             - [Vary, Accept]
             body: |2
-               | school                                               |
-               +------+-------------+---------------------------------+
-               |      | department  | program                         |
-               |      +-------------+---------------------------------+
-               | code | name        | title                           |
-              -+------+-------------+---------------------------------+-
-               | art  | Art History | Post Baccalaureate in Art       |
-               :      | Studio Art  | History                         :
-               :      :             | Bachelor of Arts in Art History |
-               :      :             | Bachelor of Arts in Studio Art  |
-               | bus  | Accounting  |                                 :
-               | edu  |             :                                 :
+               | school                                              |
+               +------+------------+---------------------------------+
+               |      | department | program                         |
+               |      +------------+---------------------------------+
+               | code | name       | title                           |
+              -+------+------------+---------------------------------+-
+               | art  | Studio Art | Post Baccalaureate in Art       |
+               :      :            : History                         :
+               :      :            | Bachelor of Arts in Art History |
+               :      :            | Bachelor of Arts in Studio Art  |
+               | bus  | Accounting |                                 :
+               :      | Economics  |                                 :
+               | edu  |            :                                 :
 
                ----
                /school{code,/department{name}.limit(3),/program{title}.limit(3)}.limit(3)
                | code | name                   | campus | code   | name        | school_code |
               -+------+------------------------+--------+--------+-------------+-------------+-
                | art  | School of Art & Design | old    | acc    | Accounting  | bus         |
-               | bus  | School of Business     | south  | arthis | Art History | art         |
+               | bus  | School of Business     | south  | arthis | Art History | la          |
                | edu  | College of Education   | old    | astro  | Astronomy   | ns          |
 
                ----
             - [Content-Type, text/plain; charset=UTF-8]
             - [Vary, Accept]
             body: |2
-               | school                                                                      |
-               +------+------------------------+--------+------------------------------------+
-               |      |                        |        | department                         |
-               |      |                        |        +--------+-------------+-------------+
-               | code | name                   | campus | code   | name        | school_code |
-              -+------+------------------------+--------+--------+-------------+-------------+-
-               | art  | School of Art & Design | old    | arthis | Art History | art         |
-               :      :                        :        | stdart | Studio Art  | art         |
+               | school                                                                     |
+               +------+------------------------+--------+-----------------------------------+
+               |      |                        |        | department                        |
+               |      |                        |        +--------+------------+-------------+
+               | code | name                   | campus | code   | name       | school_code |
+              -+------+------------------------+--------+--------+------------+-------------+-
+               | art  | School of Art & Design | old    | stdart | Studio Art | art         |
 
                ----
                /school?code='art'{*,/department.limit(3)}
                | sc   |                        :
                | ph   |                        :
                | art  | Studio Art             |
-               :      | Art History            |
                | bus  | Accounting             |
                :      | Economics              |
                :      | Management & Marketing |
                | la   | History                |
                :      | Psychology             |
                :      | Political Science      |
+               :      | Art History            |
                :      | English                |
                :      | Foreign Languages      |
 
             - [Content-Type, text/plain; charset=UTF-8]
             - [Vary, Accept]
             body: |2
-               | school                                                                      |
-               +------+----------------------------------------------------------------------+
-               |      | department                                                           |
-               |      +-------------+--------------------------------------------------------+
-               |      |             | course                                                 |
-               |      |             +------------------------------+-------------------------+
-               |      |             |                              | class                   |
-               |      |             |                              +------+--------+---------+
-               | code | name        | title                        | year | season | section |
-              -+------+-------------+------------------------------+------+--------+---------+-
-               | art  | Studio Art  | Drawing Master Class         | 2009 | spring | 001     |
-               :      :             :                              | 2010 | spring | 001     |
-               :      :             | Advanced Painting            | 2009 | spring | 001     |
-               :      :             :                              | 2010 | fall   | 001     |
-               :      :             :                              | 2010 | spring | 001     |
-               :      :             | Photography                  | 2007 | fall   | 001     |
-               :      :             :                              | 2009 | fall   | 001     |
-               :      :             :                              | 2008 | fall   | 001     |
-               :      :             :                              | 2010 | fall   | 001     |
-               :      | Art History | Antique Art: Greece and Rome | 2007 | fall   | 001     |
-               :      :             :                              | 2009 | fall   | 001     |
-               :      :             :                              | 2010 | fall   | 001     |
-               :      :             | Islamic Art                  | 2007 | spring | 001     |
-               :      :             :                              | 2008 | spring | 001     |
-               :      :             :                              | 2009 | spring | 001     |
-               :      :             :                              | 2010 | spring | 001     |
-               :      :             | Art of Photography           | 2008 | spring | 001     |
-               :      :             :                              | 2009 | spring | 001     |
-               :      :             :                              | 2010 | spring | 001     |
-               :      :             :                              | 2008 | fall   | 001     |
-               :      :             :                              | 2009 | fall   | 001     |
-               :      :             :                              | 2010 | fall   | 001     |
+               | school                                                             |
+               +------+-------------------------------------------------------------+
+               |      | department                                                  |
+               |      +------------+------------------------------------------------+
+               |      |            | course                                         |
+               |      |            +----------------------+-------------------------+
+               |      |            |                      | class                   |
+               |      |            |                      +------+--------+---------+
+               | code | name       | title                | year | season | section |
+              -+------+------------+----------------------+------+--------+---------+-
+               | art  | Studio Art | Drawing Master Class | 2009 | spring | 001     |
+               :      :            :                      | 2010 | spring | 001     |
+               :      :            | Advanced Painting    | 2009 | spring | 001     |
+               :      :            :                      | 2010 | fall   | 001     |
+               :      :            :                      | 2010 | spring | 001     |
+               :      :            | Photography          | 2007 | fall   | 001     |
+               :      :            :                      | 2009 | fall   | 001     |
+               :      :            :                      | 2008 | fall   | 001     |
+               :      :            :                      | 2010 | fall   | 001     |
 
                ----
                /school{code,/department{name,/course{title,/class{year,season,section}.sort(count(enrollment))}.filter(credits>=5).sort(count(class))}.sort(count(course))}.filter(code='art')
                :        | Bachelor of Business             | Bachelor of Business             |
                :        : Administration                   : Administration                   :
                :        | Bachelor of Arts in Economics    | Bachelor of Arts in Economics    |
-               | arthis | Post Baccalaureate in Art        | Post Baccalaureate in Art        |
-               :        : History                          : History                          :
-               :        | Bachelor of Arts in Art History  | Bachelor of Arts in Art History  |
-               :        | Bachelor of Arts in Studio Art   | Bachelor of Arts in Studio Art   |
+               | arthis | Master of Arts in English        | Master of Arts in English        |
+               :        | Master of Arts in Modern         | Master of Arts in Modern         |
+               :        : Languages                        : Languages                        :
+               :        | Master of Arts in Science        | Master of Arts in Science        |
+               :        : Teaching                         : Teaching                         :
+               :        | Science Writing                  | Science Writing                  |
+               :        | Bachelor of Arts in English      | Bachelor of Arts in English      |
+               :        | Bachelor of Arts in History      | Bachelor of Arts in History      |
+               :        | Bachelor of Arts in Political    | Bachelor of Arts in Political    |
+               :        : Science                          : Science                          :
+               :        | Bachelor of Arts in Psychology   | Bachelor of Arts in Psychology   |
+               :        | Bachelor of Arts in Spanish      | Bachelor of Arts in Spanish      |
                | astro  | Masters of Science in            | Masters of Science in            |
                :        : Mathematics                      : Mathematics                      :
                :        | Doctorate of Science in          | Doctorate of Science in          |
                |        +--------+
                | code   | code   |
               -+--------+--------+-
-               | arthis | art    |
+               | arthis | la     |
                | astro  | ns     |
                | comp   | eng    |
                | eng    | la     |
               "data": [
                 [
                   "School of Art & Design",
-                  2
+                  1
                 ],
                 [
                   "School of Business",
                 ],
                 [
                   "School of Arts and Humanities",
-                  5
+                  6
                 ],
                 [
                   "School of Music & Dance",
               "school": [
                 {
                   "name": "School of Art & Design",
-                  "1": 2
+                  "1": 1
                 },
                 {
                   "name": "School of Business",
                 },
                 {
                   "name": "School of Arts and Humanities",
-                  "1": 5
+                  "1": 6
                 },
                 {
                   "name": "School of Music & Dance",
           headers:
           - [Content-Type, text/csv; charset=UTF-8]
           - [Content-Disposition, attachment; filename="List of Schools.csv"]
-          body: "Name,# of Departments\r\nSchool of Art & Design,2\r\nSchool of Business,3\r\nCollege
-            of Education,2\r\nSchool of Engineering,4\r\nSchool of Arts and Humanities,5\r\nSchool
+          body: "Name,# of Departments\r\nSchool of Art & Design,1\r\nSchool of Business,3\r\nCollege
+            of Education,2\r\nSchool of Engineering,4\r\nSchool of Arts and Humanities,6\r\nSchool
             of Music & Dance,4\r\nSchool of Natural Sciences,4\r\nPublic Honorariums,0\r\nSchool
             of Continuing Studies,0\r\n"
         - uri: /(school :as 'List of Schools') {name :as Name, count(department) :as
           headers:
           - [Content-Type, text/tab-separated-values; charset=UTF-8]
           - [Content-Disposition, attachment; filename="List of Schools.tsv"]
-          body: "Name\t# of Departments\r\nSchool of Art & Design\t2\r\nSchool of
+          body: "Name\t# of Departments\r\nSchool of Art & Design\t1\r\nSchool of
             Business\t3\r\nCollege of Education\t2\r\nSchool of Engineering\t4\r\nSchool
-            of Arts and Humanities\t5\r\nSchool of Music & Dance\t4\r\nSchool of Natural
+            of Arts and Humanities\t6\r\nSchool of Music & Dance\t4\r\nSchool of Natural
             Sciences\t4\r\nPublic Honorariums\t0\r\nSchool of Continuing Studies\t0\r\n"
         - uri: /(school :as 'List of Schools') {name :as Name, count(department) :as
             '# of Departments'} /:xml
             <htsql:result xmlns:htsql="http://htsql.org/2010/xml">
               <school>
                 <name>School of Art &amp; Design</name>
-                <_2>2</_2>
+                <_2>1</_2>
               </school>
               <school>
                 <name>School of Business</name>
               </school>
               <school>
                 <name>School of Arts and Humanities</name>
-                <_2>5</_2>
+                <_2>6</_2>
               </school>
               <school>
                 <name>School of Music &amp; Dance</name>
             <tr><th class="htsql-empty-header"></th><th>Name</th><th># of Departments</th></tr>
             </thead>
             <tbody>
-            <tr class="htsql-odd-row"><td class="htsql-index">1</td><td class="htsql-string-type">School of Art &amp; Design</td><td class="htsql-integer-type">2</td></tr>
+            <tr class="htsql-odd-row"><td class="htsql-index">1</td><td class="htsql-string-type">School of Art &amp; Design</td><td class="htsql-integer-type">1</td></tr>
             <tr class="htsql-even-row"><td class="htsql-index">2</td><td class="htsql-string-type">School of Business</td><td class="htsql-integer-type">3</td></tr>
             <tr class="htsql-odd-row"><td class="htsql-index">3</td><td class="htsql-string-type">College of Education</td><td class="htsql-integer-type">2</td></tr>
             <tr class="htsql-even-row"><td class="htsql-index">4</td><td class="htsql-string-type">School of Engineering</td><td class="htsql-integer-type">4</td></tr>
-            <tr class="htsql-odd-row"><td class="htsql-index">5</td><td class="htsql-string-type">School of Arts and Humanities</td><td class="htsql-integer-type">5</td></tr>
+            <tr class="htsql-odd-row"><td class="htsql-index">5</td><td class="htsql-string-type">School of Arts and Humanities</td><td class="htsql-integer-type">6</td></tr>
             <tr class="htsql-even-row"><td class="htsql-index">6</td><td class="htsql-string-type">School of Music &amp; Dance</td><td class="htsql-integer-type">4</td></tr>
             <tr class="htsql-odd-row"><td class="htsql-index">7</td><td class="htsql-string-type">School of Natural Sciences</td><td class="htsql-integer-type">4</td></tr>
             <tr class="htsql-even-row"><td class="htsql-index">8</td><td class="htsql-string-type">Public Honorariums</td><td class="htsql-integer-type">0</td></tr>
              +-------------------------------+------------------+
              | Name                          | # of Departments |
             -+-------------------------------+------------------+-
-             | School of Art & Design        |                2 |
+             | School of Art & Design        |                1 |
              | School of Business            |                3 |
              | College of Education          |                2 |
              | School of Engineering         |                4 |
-             | School of Arts and Humanities |                5 |
+             | School of Arts and Humanities |                6 |
              | School of Music & Dance       |                4 |
              | School of Natural Sciences    |                4 |
              | Public Honorariums            |                0 |
                     [
                       "arthis",
                       "Art History",
-                      "art"
+                      "la"
                     ],
                     [
                       "astro",
                     {
                       "code": "arthis",
                       "name": "Art History",
-                      "school_code": "art"
+                      "school_code": "la"
                     },
                     {
                       "code": "astro",
           - [Content-Disposition, attachment; filename="_.csv"]
           body: "null,code,name,campus,code,name,school_code\r\n,art,School of Art
             & Design,old,acc,Accounting,bus\r\n,bus,School of Business,south,arthis,Art
-            History,art\r\n,edu,College of Education,old,astro,Astronomy,ns\r\n,,,,be,Bioengineering,eng\r\n,,,,bursar,Bursar's
+            History,la\r\n,edu,College of Education,old,astro,Astronomy,ns\r\n,,,,be,Bioengineering,eng\r\n,,,,bursar,Bursar's
             Office,\r\n"
         - uri: /{/null, /school.limit(3), /department.limit(5)}/:tsv
           status: 200 OK
           - [Content-Disposition, attachment; filename="_.tsv"]
           body: "null\tcode\tname\tcampus\tcode\tname\tschool_code\r\n\tart\tSchool
             of Art & Design\told\tacc\tAccounting\tbus\r\n\tbus\tSchool of Business\tsouth\tarthis\tArt
-            History\tart\r\n\tedu\tCollege of Education\told\tastro\tAstronomy\tns\r\n\t\t\t\tbe\tBioengineering\teng\r\n\t\t\t\tbursar\tBursar's
+            History\tla\r\n\tedu\tCollege of Education\told\tastro\tAstronomy\tns\r\n\t\t\t\tbe\tBioengineering\teng\r\n\t\t\t\tbursar\tBursar's
             Office\t\r\n"
         - uri: /{/null, /school.limit(3), /department.limit(5)}/:xml
           status: 200 OK
                 <department>
                   <code>arthis</code>
                   <name>Art History</name>
-                  <school_code>art</school_code>
+                  <school_code>la</school_code>
                 </department>
                 <department>
                   <code>astro</code>
             </thead>
             <tbody>
             <tr class="htsql-odd-row"><td rowspan="5" class="htsql-section htsql-index">1</td><td rowspan="5" class="htsql-section htsql-index htsql-null-record-value"></td><td rowspan="5" class="htsql-section htsql-null-record-value"></td><td class="htsql-section htsql-index">1</td><td class="htsql-section htsql-string-type">art</td><td class="htsql-section htsql-string-type">School of Art &amp; Design</td><td class="htsql-section htsql-string-type">old</td><td class="htsql-section htsql-index">1</td><td class="htsql-section htsql-string-type">acc</td><td class="htsql-section htsql-string-type">Accounting</td><td class="htsql-section htsql-string-type">bus</td></tr>
-            <tr class="htsql-even-row"><td class="htsql-index">2</td><td class="htsql-string-type">bus</td><td class="htsql-string-type">School of Business</td><td class="htsql-string-type">south</td><td class="htsql-index">2</td><td class="htsql-string-type">arthis</td><td class="htsql-string-type">Art History</td><td class="htsql-string-type">art</td></tr>
+            <tr class="htsql-even-row"><td class="htsql-index">2</td><td class="htsql-string-type">bus</td><td class="htsql-string-type">School of Business</td><td class="htsql-string-type">south</td><td class="htsql-index">2</td><td class="htsql-string-type">arthis</td><td class="htsql-string-type">Art History</td><td class="htsql-string-type">la</td></tr>
             <tr class="htsql-odd-row"><td rowspan="3" class="htsql-index">3</td><td rowspan="3" class="htsql-string-type">edu</td><td rowspan="3" class="htsql-string-type">College of Education</td><td rowspan="3" class="htsql-string-type">old</td><td class="htsql-index">3</td><td class="htsql-string-type">astro</td><td class="htsql-string-type">Astronomy</td><td class="htsql-string-type">ns</td></tr>
             <tr class="htsql-even-row"><td class="htsql-index">4</td><td class="htsql-string-type">be</td><td class="htsql-string-type">Bioengineering</td><td class="htsql-string-type">eng</td></tr>
             <tr class="htsql-odd-row"><td class="htsql-index">5</td><td class="htsql-string-type">bursar</td><td class="htsql-string-type">Bursar's Office</td><td class="htsql-string-type htsql-null-value"></td></tr>
              | null | code | name                   | campus | code   | name            | school_code |
             -+------+------+------------------------+--------+--------+-----------------+-------------+-
              :      | art  | School of Art & Design | old    | acc    | Accounting      | bus         |
-             :      | bus  | School of Business     | south  | arthis | Art History     | art         |
+             :      | bus  | School of Business     | south  | arthis | Art History     | la          |
              :      | edu  | College of Education   | old    | astro  | Astronomy       | ns          |
              :      :      :                        :        | be     | Bioengineering  | eng         |
              :      :      :                        :        | bursar | Bursar's Office |             |
           - [Content-Type, text/plain; charset=UTF-8]
           - [Vary, Accept]
           body: |2
-             | school                                                                      |
-             +------+------------------------+--------+------------------------------------+
-             |      |                        |        | department                         |
-             |      |                        |        +--------+-------------+-------------+
-             | code | name                   | campus | code   | name        | school_code |
-            -+------+------------------------+--------+--------+-------------+-------------+-
-             | art  | School of Art & Design | old    | arthis | Art History | art         |
-             :      :                        :        | stdart | Studio Art  | art         |
+             | school                                                                     |
+             +------+------------------------+--------+-----------------------------------+
+             |      |                        |        | department                        |
+             |      |                        |        +--------+------------+-------------+
+             | code | name                   | campus | code   | name       | school_code |
+            -+------+------------------------+--------+--------+------------+-------------+-
+             | art  | School of Art & Design | old    | stdart | Studio Art | art         |
 
              ----
              /school?code='art'{*,/department}
           - [Content-Type, text/plain; charset=UTF-8]
           - [Vary, Accept]
           body: |2
-             | school                                                                      |
-             +------+------------------------+--------+------------------------------------+
-             |      |                        |        | department                         |
-             |      |                        |        +--------+-------------+-------------+
-             | code | name                   | campus | code   | name        | school_code |
-            -+------+------------------------+--------+--------+-------------+-------------+-
-             | art  | School of Art & Design | old    | arthis | Art History | art         |
-             :      :                        :        | stdart | Studio Art  | art         |
+             | school                                                                     |
+             +------+------------------------+--------+-----------------------------------+
+             |      |                        |        | department                        |
+             |      |                        |        +--------+------------+-------------+
+             | code | name                   | campus | code   | name       | school_code |
+            -+------+------------------------+--------+--------+------------+-------------+-
+             | art  | School of Art & Design | old    | stdart | Studio Art | art         |
 
              ----
              /school{*,/department}?code='art'
              +------+-------------------+
              | code | count(department) |
             -+------+-------------------+-
-             | art  |                 2 |
+             | art  |                 1 |
              | bus  |                 3 |
              | edu  |                 2 |
              | eng  |                 4 |
-             | la   |                 5 |
+             | la   |                 6 |
              | mus  |                 4 |
              | ns   |                 4 |
              | ph   |                 0 |
       id: embedding
       tests:
       - py-include: test/code/test_embedding.py
-        stdout: |
-          URI: /school{code, count(program), count(department)}
-          school(code=u'art', [1]=3, [2]=2)
-          school(code=u'bus', [1]=6, [2]=3)
-          school(code=u'edu', [1]=7, [2]=2)
-          school(code=u'eng', [1]=8, [2]=4)
-          school(code=u'la', [1]=9, [2]=5)
-          school(code=u'mus', [1]=0, [2]=4)
-          school(code=u'ns', [1]=6, [2]=4)
-          school(code=u'ph', [1]=1, [2]=0)
-          school(code=u'sc', [1]=0, [2]=0)
+        stdout: 'URI: /school{code, count(program), count(department)}
+
+          school(code=u''art'', [1]=3, [2]=1)
+
+          school(code=u''bus'', [1]=6, [2]=3)
+
+          school(code=u''edu'', [1]=7, [2]=2)
+
+          school(code=u''eng'', [1]=8, [2]=4)
+
+          school(code=u''la'', [1]=9, [2]=6)
+
+          school(code=u''mus'', [1]=0, [2]=4)
+
+          school(code=u''ns'', [1]=6, [2]=4)
+
+          school(code=u''ph'', [1]=1, [2]=0)
+
+          school(code=u''sc'', [1]=0, [2]=0)
+
 
           URI: /school{name, count(program)}?code=$school_code
-          $school_code: 'bus'
+
+          $school_code: ''bus''
+
           School of Business: 6
 
+
           URI: /school{name, num_prog:=count(program)}?num_prog>=$min_prog&num_prog<=$max_prog
+
           $min_prog: 6
+
           $max_prog: 8
+
           School of Business: 6
+
           College of Education: 7
+
           School of Engineering: 8
+
           School of Natural Sciences: 6
 
+
           URI: /school?campus==$campus
+
           $campus: None
-          school(code=u'ph', name=u'Public Honorariums', campus=None)
-          school(code=u'sc', name=u'School of Continuing Studies', campus=None)
+
+          school(code=u''ph'', name=u''Public Honorariums'', campus=None)
+
+          school(code=u''sc'', name=u''School of Continuing Studies'', campus=None)
+
 
           URI: /school?campus=$campus
-          $campus: ['north', 'south']
-          school(code=u'bus', name=u'School of Business', campus=u'south')
-          school(code=u'eng', name=u'School of Engineering', campus=u'north')
-          school(code=u'mus', name=u'School of Music & Dance', campus=u'south')
-
-          URI: /{$untyped, $selector, $boolean, $integer, $float, $decimal, $date, $time, $datetime}
-          $untyped: 'HTSQL'
-          $selector: ['HTTP', 'SQL']
+
+          $campus: [''north'', ''south'']
+
+          school(code=u''bus'', name=u''School of Business'', campus=u''south'')
+
+          school(code=u''eng'', name=u''School of Engineering'', campus=u''north'')
+
+          school(code=u''mus'', name=u''School of Music & Dance'', campus=u''south'')
+
+
+          URI: /{$untyped, $selector, $boolean, $integer, $float, $decimal, $date,
+          $time, $datetime}
+
+          $untyped: ''HTSQL''
+
+          $selector: [''HTTP'', ''SQL'']
+
           $boolean: True
+
           $integer: 3571
+
           $float: -0.57721
-          $decimal: Decimal('0.875')
+
+          $decimal: Decimal(''0.875'')
+
           $date: datetime.date(2010, 4, 15)
+
           $time: datetime.time(20, 3)
+
           $datetime: datetime.datetime(2010, 4, 15, 20, 3)
-          Record([0]=u'HTSQL', [1]=Record([0]=u'HTTP', [1]=u'SQL'), [2]=True, [3]=3571, [4]=-0.57721, [5]=Decimal('0.875'), [6]=datetime.date(2010, 4, 15), [7]=datetime.time(20, 3), [8]=datetime.datetime(2010, 4, 15, 20, 3))
+
+          Record([0]=u''HTSQL'', [1]=Record([0]=u''HTTP'', [1]=u''SQL''), [2]=True,
+          [3]=3571, [4]=-0.57721, [5]=Decimal(''0.875''), [6]=datetime.date(2010,
+          4, 15), [7]=datetime.time(20, 3), [8]=datetime.datetime(2010, 4, 15, 20,
+          3))
+
 
           URI: /meta(/link?table.name=$table_name)
-          $table_name: 'school'
-          link(table_name=u'school', name=u'department', is_singular=False, target_name=u'department', reverse_name=u'school')
-          link(table_name=u'school', name=u'program', is_singular=False, target_name=u'program', reverse_name=u'school')
+
+          $table_name: ''school''
+
+          link(table_name=u''school'', name=u''department'', is_singular=False, target_name=u''department'',
+          reverse_name=u''school'')
+
+          link(table_name=u''school'', name=u''program'', is_singular=False, target_name=u''program'',
+          reverse_name=u''school'')
+
 
           URI: /school
-          school(code=u'art', name=u'School of Art & Design', campus=u'old')
-          school(code=u'bus', name=u'School of Business', campus=u'south')
-          school(code=u'edu', name=u'College of Education', campus=u'old')
+
+          school(code=u''art'', name=u''School of Art & Design'', campus=u''old'')
+
+          school(code=u''bus'', name=u''School of Business'', campus=u''south'')
+
+          school(code=u''edu'', name=u''College of Education'', campus=u''old'')
+
+'

test/output/mysql.yaml

              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
           - [Content-Type, text/plain; charset=UTF-8]
           - [Vary, Accept]
           body: |2
-             | department                         |
-             +--------+-------------+-------------+
-             | code   | name        | school_code |
-            -+--------+-------------+-------------+-
-             | arthis | Art History | art         |
-             | stdart | Studio Art  | art         |
+             | department                        |
+             +--------+------------+-------------+
+             | code   | name       | school_code |
+            -+--------+------------+-------------+-
+             | stdart | Studio Art | art         |
 
              ----
              /(school?code='art').department
              +-------------------------------+-------------------+
              | name                          | count(department) |
             -+-------------------------------+-------------------+-
-             | School of Art & Design        |                 2 |
+             | School of Art & Design        |                 1 |
              | School of Business            |                 3 |
              | College of Education          |                 2 |
              | School of Engineering         |                 4 |
-             | School of Arts and Humanities |                 5 |
+             | School of Arts and Humanities |                 6 |
              | School of Music & Dance       |                 4 |
              | School of Natural Sciences    |                 4 |
              | Public Honorariums            |                 0 |
              +-------------------------------+------------+
              | name                          | # of Dept. |
             -+-------------------------------+------------+-
-             | School of Art & Design        |          2 |
+             | School of Art & Design        |          1 |
              | School of Business            |          3 |
              | College of Education          |          2 |
              | School of Engineering         |          4 |
-             | School of Arts and Humanities |          5 |
+             | School of Arts and Humanities |          6 |
              | School of Music & Dance       |          4 |
              | School of Natural Sciences    |          4 |
              | Public Honorariums            |          0 |
              | School of Business            | Accounting             | Audit                            |
              | School of Business            | Accounting             | Advanced Accounting              |
              | School of Business            | Accounting             | Accounting Internship            |
-             | School of Art & Design        | Art History            | History of Art Criticism I       |
-             | School of Art & Design        | Art History            | History of Art Criticism II      |
-             | School of Art & Design        | Art History            | North American Native Art        |
-             | School of Art & Design        | Art History            | Antique Art: Greece and Rome     |
-             | School of Art & Design        | Art History            | Antique Art: The Middle East     |
-             | School of Art & Design        | Art History            | Arts of Asia                     |
-             | School of Art & Design        | Art History            | Medieval Christian Art           |
-             | School of Art & Design        | Art History            | Asian Architecture               |
-             | School of Art & Design        | Art History            | Italian Renaissance Art          |
-             | School of Art & Design        | Art History            | Dutch and Flemish Painting       |
-             | School of Art & Design        | Art History            | Impressionism                    |
-             | School of Art & Design        | Art History            | Modernism                        |
-             | School of Art & Design        | Art History            | Postmodernism                    |
-             | School of Art & Design        | Art History            | Islamic Art                      |
-             | School of Art & Design        | Art History            | Art of Photography               |
-             | School of Art & Design        | Art History            | Industrial Architecture          |
-             | School of Art & Design        | Art History            | Contemporary Latin American Art  |
-             | School of Art & Design        | Art History            | Methods in Art History           |
-             | School of Art & Design        | Art History            | Museum and Gallery Management    |
-             | School of Art & Design        | Art History            | Materials and Construction in    |
+             | School of Arts and Humanities | Art History            | History of Art Criticism I       |
+             | School of Arts and Humanities | Art History            | History of Art Criticism II      |
+             | School of Arts and Humanities | Art History            | North American Native Art        |
+             | School of Arts and Humanities | Art History            | Antique Art: Greece and Rome     |
+             | School of Arts and Humanities | Art History            | Antique Art: The Middle East     |
+             | School of Arts and Humanities | Art History            | Arts of Asia                     |
+             | School of Arts and Humanities | Art History            | Medieval Christian Art           |
+             | School of Arts and Humanities | Art History            | Asian Architecture               |
+             | School of Arts and Humanities | Art History            | Italian Renaissance Art          |
+             | School of Arts and Humanities | Art History            | Dutch and Flemish Painting       |
+             | School of Arts and Humanities | Art History            | Impressionism                    |
+             | School of Arts and Humanities | Art History            | Modernism                        |
+             | School of Arts and Humanities | Art History            | Postmodernism                    |
+             | School of Arts and Humanities | Art History            | Islamic Art                      |
+             | School of Arts and Humanities | Art History            | Art of Photography               |
+             | School of Arts and Humanities | Art History            | Industrial Architecture          |
+             | School of Arts and Humanities | Art History            | Contemporary Latin American Art  |
+             | School of Arts and Humanities | Art History            | Methods in Art History           |
+             | School of Arts and Humanities | Art History            | Museum and Gallery Management    |
+             | School of Arts and Humanities | Art History            | Materials and Construction in    |
              :                               :                        : European Art                     :
              | School of Natural Sciences    | Astronomy              | General Astronomy I              |
              | School of Natural Sciences    | Astronomy              | General Astronomy I Lab          |
              | School of Business            | Accounting             | Audit                            |
              | School of Business            | Accounting             | Advanced Accounting              |
              | School of Business            | Accounting             | Accounting Internship            |
-             | School of Art & Design        | Art History            | History of Art Criticism I       |
-             | School of Art & Design        | Art History            | History of Art Criticism II      |
-             | School of Art & Design        | Art History            | North American Native Art        |
-             | School of Art & Design        | Art History            | Antique Art: Greece and Rome     |
-             | School of Art & Design        | Art History            | Antique Art: The Middle East     |
-             | School of Art & Design        | Art History            | Arts of Asia                     |
-             | School of Art & Design        | Art History            | Medieval Christian Art           |
-             | School of Art & Design        | Art History            | Asian Architecture               |
-             | School of Art & Design        | Art History            | Italian Renaissance Art          |
-             | School of Art & Design        | Art History            | Dutch and Flemish Painting       |
-             | School of Art & Design        | Art History            | Impressionism                    |
-             | School of Art & Design        | Art History            | Modernism                        |
-             | School of Art & Design        | Art History            | Postmodernism                    |
-             | School of Art & Design        | Art History            | Islamic Art                      |
-             | School of Art & Design        | Art History            | Art of Photography               |
-             | School of Art & Design        | Art History            | Industrial Architecture          |
-             | School of Art & Design        | Art History            | Contemporary Latin American Art  |
-             | School of Art & Design        | Art History            | Methods in Art History           |
-             | School of Art & Design        | Art History            | Museum and Gallery Management    |
-             | School of Art & Design        | Art History            | Materials and Construction in    |
+             | School of Arts and Humanities | Art History            | History of Art Criticism I       |
+             | School of Arts and Humanities | Art History            | History of Art Criticism II      |
+             | School of Arts and Humanities | Art History            | North American Native Art        |
+             | School of Arts and Humanities | Art History            | Antique Art: Greece and Rome     |
+             | School of Arts and Humanities | Art History            | Antique Art: The Middle East     |
+             | School of Arts and Humanities | Art History            | Arts of Asia                     |
+             | School of Arts and Humanities | Art History            | Medieval Christian Art           |
+             | School of Arts and Humanities | Art History            | Asian Architecture               |
+             | School of Arts and Humanities | Art History            | Italian Renaissance Art          |
+             | School of Arts and Humanities | Art History            | Dutch and Flemish Painting       |
+             | School of Arts and Humanities | Art History            | Impressionism                    |
+             | School of Arts and Humanities | Art History            | Modernism                        |
+             | School of Arts and Humanities | Art History            | Postmodernism                    |
+             | School of Arts and Humanities | Art History            | Islamic Art                      |
+             | School of Arts and Humanities | Art History            | Art of Photography               |
+             | School of Arts and Humanities | Art History            | Industrial Architecture          |
+             | School of Arts and Humanities | Art History            | Contemporary Latin American Art  |
+             | School of Arts and Humanities | Art History            | Methods in Art History           |
+             | School of Arts and Humanities | Art History            | Museum and Gallery Management    |
+             | School of Arts and Humanities | Art History            | Materials and Construction in    |
              :                               :                        : European Art                     :
              | School of Natural Sciences    | Astronomy              | General Astronomy I              |
              | School of Natural Sciences    | Astronomy              | General Astronomy I Lab          |
              | code   | name                   | school_code | code | name                          | campus |
             -+--------+------------------------+-------------+------+-------------------------------+--------+-
              | acc    | Accounting             | bus         | bus  | School of Business            | south  |
-             | arthis | Art History            | art         | art  | School of Art & Design        | old    |
+             | arthis | Art History            | la          | la   | School of Arts and Humanities | old    |
              | astro  | Astronomy              | ns          | ns   | School of Natural Sciences    | old    |
              | be     | Bioengineering         | eng         | eng  | School of Engineering         | north  |
              | bursar | Bursar's Office        |             |      |                               |        |
           - [Content-Type, text/csv; charset=UTF-8]
           - [Content-Disposition, attachment; filename="department.csv"]
           body: "name,name,count(course)\r\nSchool of Arts and Humanities,English,21\r\nSchool
-            of Arts and Humanities,Foreign Languages,21\r\nSchool of Art & Design,Art
+            of Arts and Humanities,Foreign Languages,21\r\nSchool of Arts and Humanities,Art
             History,20\r\nSchool of Arts and Humanities,Political Science,19\r\nSchool
             of Art & Design,Studio Art,19\r\n"
       - id: relating-and-aggregating-data
              +-------------------------------+----------------+-------------------+
              | name                          | count(program) | count(department) |
             -+-------------------------------+----------------+-------------------+-
-             | School of Art & Design        |              3 |                 2 |
+             | School of Art & Design        |              3 |                 1 |
              | School of Business            |              6 |                 3 |
              | College of Education          |              7 |                 2 |
              | School of Engineering         |              8 |                 4 |
-             | School of Arts and Humanities |              9 |                 5 |
+             | School of Arts and Humanities |              9 |                 6 |
              | School of Music & Dance       |              0 |                 4 |
              | School of Natural Sciences    |              6 |                 4 |
              | Public Honorariums            |              1 |                 0 |
              +-------------------------------+-----------------------------------+
              | name                          | avg(department.count(course))     |
             -+-------------------------------+-----------------------------------+-
-             | School of Art & Design        |                              19.5 |
+             | School of Art & Design        |                                19 |
              | School of Business            | 14.666666666666666666666666666667 |
              | College of Education          |                              17.5 |
              | School of Engineering         |                             17.75 |
-             | School of Arts and Humanities |                                19 |
+             | School of Arts and Humanities | 19.166666666666666666666666666667 |
              | School of Music & Dance       |                                 0 |
              | School of Natural Sciences    |                              18.5 |
              | Public Honorariums            |                                   |
              +-------------------------------+--------------------------------------------+
              | name                          | count(department?exists(course?credits>3)) |
             -+-------------------------------+--------------------------------------------+-
-             | School of Art & Design        |                                          2 |
+             | School of Art & Design        |                                          1 |
              | School of Business            |                                          3 |
              | College of Education          |                                          1 |
              | School of Engineering         |                                          4 |
-             | School of Arts and Humanities |                                          5 |
+             | School of Arts and Humanities |                                          6 |
              | School of Music & Dance       |                                          0 |
              | School of Natural Sciences    |                                          4 |
              | Public Honorariums            |                                          0 |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
              +--------+------------------------+-------------+
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
-             | arthis | Art History            | art         |
              | stdart | Studio Art             | art         |
              | acc    | Accounting             | bus         |
              | econ   | Economics              | bus         |
              | comp   | Computer Science       | eng         |
              | ee     | Electrical Engineering | eng         |
              | me     | Mechanical Engineering | eng         |
+             | arthis | Art History            | la          |
              | eng    | English                | la          |
              | hist   | History                | la          |
              | lang   | Foreign Languages      | la          |
              | name                          | count(department) |
             -+-------------------------------+-------------------+-
              | School of Engineering         |                 4 |
-             | School of Arts and Humanities |                 5 |
+             | School of Arts and Humanities |                 6 |
              | School of Music & Dance       |                 4 |
              | School of Natural Sciences    |                 4 |
 
              | name                          | num_dept |
             -+-------------------------------+----------+-
              | School of Engineering         |        4 |
-             | School of Arts and Humanities |        5 |
+             | School of Arts and Humanities |        6 |
              | School of Music & Dance       |        4 |
              | School of Natural Sciences    |        4 |
 
              | name                          | num_dept |
             -+-------------------------------+----------+-
              | School of Engineering         |        4 |
-             | School of Arts and Humanities |        5 |
+             | School of Arts and Humanities |        6 |
              | School of Music & Dance       |        4 |
              | School of Natural Sciences    |        4 |
 
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | chem   | Chemistry              | ns          |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | econ   | Economics              | bus         |
              | edpol  | Educational Policy     | edu         |
              | eng    | English                | la          |
              +--------+-------------------+-------------+
              | code   | name              | school_code |
             -+--------+-------------------+-------------+-
-             | arthis | Art History       | art         |
+             | arthis | Art History       | la          |
              | astro  | Astronomy         | ns          |
              | comp   | Computer Science  | eng         |
              | eng    | English           | la          |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
              | code   | code | boolean(school) |
             -+--------+------+-----------------+-
              | acc    | bus  | true            |
-             | arthis | art  | true            |
+             | arthis | la   | true            |
              | astro  | ns   | true            |
              | be     | eng  | true            |
              | bursar |      | false           |
              +--------+------------------------+-------------+
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
-             | arthis | Art History            | art         |
              | stdart | Studio Art             | art         |
              | acc    | Accounting             | bus         |
              | econ   | Economics              | bus         |
              | comp   | Computer Science       | eng         |
              | ee     | Electrical Engineering | eng         |
              | me     | Mechanical Engineering | eng         |
+             | arthis | Art History            | la          |
              | eng    | English                | la          |
              | hist   | History                | la          |
              | lang   | Foreign Languages      | la          |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
              | bus         | ubusad   | Bachelor of Business             | bs     |              |
              :             :          : Administration                   :        :              :
              | bus         | uecon    | Bachelor of Arts in Economics    | ba     | gecon        |
-             | art         | gart     | Post Baccalaureate in Art        | pb     |              |
-             :             :          : History                          :        :              :
-             | art         | uhist    | Bachelor of Arts in Art History  | ba     |              |
-             | art         | ustudio  | Bachelor of Arts in Studio Art   | ba     |              |
+             | la          | gengl    | Master of Arts in English        | ma     |              |
+             | la          | glang    | Master of Arts in Modern         | ma     |              |
+             :             :          : Languages                        :        :              :
+             | la          | gscitch  | Master of Arts in Science        | ma     |              |
+             :             :          : Teaching                         :        :              :
+             | la          | psciwri  | Science Writing                  | ct     |              |
+             | la          | uengl    | Bachelor of Arts in English      | ba     | gengl        |
+             | la          | uhist    | Bachelor of Arts in History      | ba     |              |
+             | la          | upolisci | Bachelor of Arts in Political    | ba     |              |
+             :             :          : Science                          :        :              :
+             | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
+             | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
              | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | chem   | Chemistry              | ns          |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
              | code   | name                   | school_code |
             -+--------+------------------------+-------------+-
              | acc    | Accounting             | bus         |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | astro  | Astronomy              | ns          |
              | be     | Bioengineering         | eng         |
              | bursar | Bursar's Office        |             |
              | bursar | Bursar's Office        |             |
              | be     | Bioengineering         | eng         |
              | astro  | Astronomy              | ns          |
-             | arthis | Art History            | art         |
+             | arthis | Art History            | la          |
              | acc    | Accounting             | bus         |