Commits

Kirill Simonov committed 23b5ed1

Minor fix to the demo data.

  • Participants
  • Parent commits 22fd197

Comments (0)

Files changed (6)

File test/output/mssql.yaml

              :             :          : Science                          :        :              :
              | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
              | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              :             :          : Science                          :        :              :
              | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
              | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
-             :             :          : Mathematics                      :        :              :
              | ns          | uastro   | Bachelor of Science in Astronomy | bs     |              |
              | ns          | uchem    | Bachelor of Science in Chemistry | bs     |              |
              | ns          | umth     | Bachelor of Science in           | bs     | gmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | uphys    | Bachelor of Science in Physics   | bs     |              |
-                                                                                         (21 rows)
+                                                                                         (20 rows)
 
              ----
              /program?degree={'ba','bs'}
              | ba      |
              | ba      |
              | ba      |
-             | bs      |
+             | ms      |
              | ph      |
              | bs      |
              | bs      |
              | School of Engineering         |                     2 |
              | School of Arts and Humanities |                     3 |
              | School of Music & Dance       |                     0 |
-             | School of Natural Sciences    |                     2 |
+             | School of Natural Sciences    |                     3 |
              | Public Honorariums            |                     0 |
              | School of Continuing Studies  |                     0 |
                                                               (9 rows)
              | degree | count(program) |
             -+--------+----------------+-
              | ba     |             10 |
-             | bs     |             11 |
+             | bs     |             10 |
              | ct     |              4 |
              | ma     |              7 |
-             | ms     |              5 |
+             | ms     |              6 |
              | pb     |              1 |
              | ph     |              1 |
                                 (7 rows)
              | ba             |
              | bs             |
              | ma             |
-                       (3 rows)
+             | ms             |
+                       (4 rows)
 
              ----
              /(program^degree)?count(program)>5
              | degree | count(^) |
             -+--------+----------+-
              | ba     |       10 |
-             | bs     |       11 |
+             | bs     |       10 |
              | ct     |        4 |
              | ma     |        7 |
-             | ms     |        5 |
+             | ms     |        6 |
              | pb     |        1 |
              | ph     |        1 |
                           (7 rows)
              :             :          : Science                          :        :              :
              | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
              | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              :             :          : History                          :        :              :
              | art         | uhist    | Bachelor of Arts in Art History  | ba     |              |
              | art         | ustudio  | Bachelor of Arts in Studio Art   | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              | eng         | ucompsci | B.S. in Computer Science         | bs     |              |
              | eng         | uelec    | B.S. in Electrical Engineering   | bs     | gee          |
              | eng         | umech    | B.S. in Mechanical Engineering   | bs     | gme          |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              | bus         | ubusad   | Bachelor of Business             | bs     |              |
              :             :          : Administration                   :        :              :
              | bus         | uecon    | Bachelor of Arts in Economics    | ba     | gecon        |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              | ns          | umth     | Bachelor of Science in           | bs     | gmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | uphys    | Bachelor of Science in Physics   | bs     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
                |      +---------------------------------------------------------+                                   |                                   |
                | code | count(program?degree='ph') | count(program?degree='bs') | count(school.program?degree='ph') | count(school.program?degree='bs') |
               -+------+----------------------------+----------------------------+-----------------------------------+-----------------------------------+-
-               | mth  |                          1 |                          5 |                                 1 |                                 5 |
+               | mth  |                          1 |                          4 |                                 1 |                                 4 |
                                                                                                                                                   (1 row)
 
                ----
                | eng  | gee   | ms     |         1 |
                | eng  | gme   | ms     |         1 |
                | la   | gengl | ma     |         1 |
-               | ns   | gmth  | bs     |         1 |
+               | ns   | gmth  | ms     |         1 |
                | ns   | pmth  | ph     |         1 |
                                             (7 rows)
 
                +----------------+
                | degree         |
               -+----------------+-
-               | bs             |
+               | ba             |
                           (1 row)
 
                ----
                +----------------+
                | degree         |
               -+----------------+-
-               | bs             |
+               | ba             |
                           (1 row)
 
                ----
                | degree     | count(^)     |
               -+------------+--------------+-
                | ba         |           10 |
-               | bs         |           11 |
+               | bs         |           10 |
                | ct         |            4 |
                | ma         |            7 |
-               | ms         |            5 |
+               | ms         |            6 |
                | pb         |            1 |
                | ph         |            1 |
                                     (7 rows)
                | degree  | count(program)  |
               -+---------+-----------------+-
                | ba      |              10 |
-               | bs      |              11 |
+               | bs      |              10 |
                | ct      |               4 |
                | ma      |               7 |
-               | ms      |               5 |
+               | ms      |               6 |
                | pb      |               1 |
                | ph      |               1 |
                                     (7 rows)
                | degree | count(^.student) |
               -+--------+------------------+-
                | ba     |              102 |
-               | bs     |              106 |
+               | bs     |               93 |
                | ct     |               37 |
                | ma     |               77 |
-               | ms     |               36 |
+               | ms     |               49 |
                | pb     |               16 |
                | ph     |               10 |
                                     (7 rows)
                | degree | count(program.student) |
               -+--------+------------------------+-
                | ba     |                    102 |
-               | bs     |                    106 |
+               | bs     |                     93 |
                | ct     |                     37 |
                | ma     |                     77 |
-               | ms     |                     36 |
+               | ms     |                     49 |
                | pb     |                     16 |
                | ph     |                     10 |
                                           (7 rows)
                | ct                        |
                | ma                        |
                | bs                        |
+               | ms                        |
                | ph                        |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree})
                | ct                        |
                | ma                        |
                | bs                        |
+               | ms                        |
                | ph                        |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree}){*}
                | ba         |            5 |
                | ct         |            1 |
                | ma         |            3 |
-               | bs         |            5 |
+               | bs         |            4 |
+               | ms         |            1 |
                | ph         |            1 |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree}){*,count(^)}
                | ba     |               33 |
                | ct     |                5 |
                | ma     |               34 |
-               | bs     |               51 |
+               | bs     |               38 |
+               | ms     |               13 |
                | ph     |               10 |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree}){*,count(^.student)}
                | ct                                      |
                | ma                                      |
                | bs                                      |
+               | ms                                      |
                | ph                                      |
                | --                                      |
-                                                 (18 rows)
+                                                 (19 rows)
 
                ----
                /school.distinct(program{degree:if_null('--')})
                | degree | count(^) |
               -+--------+----------+-
                | ba     |       10 |
-               | bs     |       11 |
+               | bs     |       10 |
                | ma     |        7 |
-                            (3 rows)
+               | ms     |        6 |
+                            (4 rows)
 
                ----
                /program^degree{*,count(^)}?count(^)>5
                | ct             |
                | ma             |
                | bs             |
+               | ms             |
                | ph             |
-                        (17 rows)
+                        (18 rows)
 
                ----
                /school.(program^degree)
                | ba                    |
                | pb                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | bs                    |
                | ms                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | bs                    |
                | ms                    |
                | ct                    |
                | ma                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | ba                    |
                | ct                    |
                | ct                    |
                | ma                    |
                | ms                    |
-                               (55 rows)
+                               (59 rows)
 
                ----
                /department.(school.program^degree)
                | eng         | ucompsci | B.S. in Computer Science         | bs     |              |
                | eng         | uelec    | B.S. in Electrical Engineering   | bs     | gee          |
                | eng         | umech    | B.S. in Mechanical Engineering   | bs     | gme          |
-               | ns          | gmth     | Masters of Science in            | bs     | pmth         |
-               :             :          : Mathematics                      :        :              :
                | ns          | uastro   | Bachelor of Science in Astronomy | bs     |              |
                | ns          | uchem    | Bachelor of Science in Chemistry | bs     |              |
                | ns          | umth     | Bachelor of Science in           | bs     | gmth         |
                | eng         | gbuseng  | M.S. in Business and Engineering | ms     |              |
                | eng         | gee      | M.S. in Electrical Engineering   | ms     |              |
                | eng         | gme      | M.S. in Mechanical Engineering   | ms     |              |
+               | ns          | gmth     | Masters of Science in            | ms     | pmth         |
+               :             :          : Mathematics                      :        :              :
                | art         | gart     | Post Baccalaureate in Art        | pb     |              |
                :             :          : History                          :        :              :
                | ns          | pmth     | Doctorate of Science in          | ph     |              |
                | eng         | umech    | B.S. in Mechanical Engineering   | bs     | gme          |             11 |
                | ns          | uchem    | Bachelor of Science in Chemistry | bs     |              |             11 |
                | eng         | ucompsci | B.S. in Computer Science         | bs     |              |             12 |
-               | ns          | gmth     | Masters of Science in            | bs     | pmth         |             13 |
-               :             :          : Mathematics                      :        :              :                :
                | ns          | umth     | Bachelor of Science in           | bs     | gmth         |             13 |
                :             :          : Mathematics                      :        :              :                :
                | la          | psciwri  | Science Writing                  | ct     |              |              5 |
                | eng         | gbe      | M.S. in Bioengineering           | ms     |              |              8 |
                | eng         | gbuseng  | M.S. in Business and Engineering | ms     |              |              9 |
                | edu         | gedu     | M.S. in Education                | ms     |              |             11 |
+               | ns          | gmth     | Masters of Science in            | ms     | pmth         |             13 |
+               :             :          : Mathematics                      :        :              :                :
                | art         | gart     | Post Baccalaureate in Art        | pb     |              |             16 |
                :             :          : History                          :        :              :                :
                | ns          | pmth     | Doctorate of Science in          | ph     |              |             10 |
                | degree | exists(^) | count(^) |
               -+--------+-----------+----------+-
                | ba     | true      |       10 |
-               | bs     | true      |       11 |
+               | bs     | true      |       10 |
                | ct     | true      |        4 |
                | ma     | true      |        7 |
-               | ms     | true      |        5 |
+               | ms     | true      |        6 |
                | pb     | true      |        1 |
                | ph     | true      |        1 |
                                         (7 rows)
                | eng  |              8 |                                2 |
                | la   |              9 |                                3 |
                | mus  |              0 |                                0 |
-               | ns   |              6 |                                2 |
+               | ns   |              6 |                                3 |
                | ph   |              1 |                                0 |
                | sc   |              0 |                                0 |
                                                                    (9 rows)
                | eng  |              8 |                     2 |
                | la   |              9 |                     3 |
                | mus  |              0 |                     0 |
-               | ns   |              6 |                     2 |
+               | ns   |              6 |                     3 |
                | ph   |              1 |                     0 |
                | sc   |              0 |                     0 |
                                                         (9 rows)
                | degree | count(^) | count(^.student) |
               -+--------+----------+------------------+-
                | ba     |       10 |              102 |
-               | bs     |       11 |              106 |
+               | bs     |       10 |               93 |
                | ct     |        4 |               37 |
                | ma     |        7 |               77 |
-               | ms     |        5 |               36 |
+               | ms     |        6 |               49 |
                | pb     |        1 |               16 |
                | ph     |        1 |               10 |
                                                (7 rows)
                | degree | count(^) | count(^.student) |
               -+--------+----------+------------------+-
                | ba     |       10 |              102 |
-               | bs     |       11 |              106 |
+               | bs     |       10 |               93 |
                | ct     |        4 |               37 |
                | ma     |        7 |               77 |
-               | ms     |        5 |               36 |
+               | ms     |        6 |               49 |
                | pb     |        1 |               16 |
                | ph     |        1 |               10 |
                                                (7 rows)
                | degree | count(^) | count(^.student) |
               -+--------+----------+------------------+-
                | ba     |       10 |              102 |
-               | bs     |       11 |              106 |
+               | bs     |       10 |               93 |
                | ct     |        4 |               37 |
                | ma     |        7 |               77 |
-               | ms     |        5 |               36 |
+               | ms     |        6 |               49 |
                | pb     |        1 |               16 |
                | ph     |        1 |               10 |
                                                (7 rows)
              | la          | gengl | Master of Arts in English      | ma     |              |
              | ns          | pmth  | Doctorate of Science in        | ph     |              |
              :             :       : Mathematics                    :        :              :
-             | ns          | gmth  | Masters of Science in          | bs     | pmth         |
+             | ns          | gmth  | Masters of Science in          | ms     | pmth         |
              :             :       : Mathematics                    :        :              :
                                                                                      (7 rows)
 
              | gee   | M.S. in Electrical Engineering | ms     |
              | gme   | M.S. in Mechanical Engineering | ms     |
              | gengl | Master of Arts in English      | ma     |
-             | gmth  | Masters of Science in          | bs     |
+             | gmth  | Masters of Science in          | ms     |
              :       : Mathematics                    :        :
              | pmth  | Doctorate of Science in        | ph     |
              :       : Mathematics                    :        :

File test/output/mysql.yaml

              :             :          : Science                          :        :              :
              | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
              | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              :             :          : Science                          :        :              :
              | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
              | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
-             :             :          : Mathematics                      :        :              :
              | ns          | uastro   | Bachelor of Science in Astronomy | bs     |              |
              | ns          | uchem    | Bachelor of Science in Chemistry | bs     |              |
              | ns          | umth     | Bachelor of Science in           | bs     | gmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | uphys    | Bachelor of Science in Physics   | bs     |              |
-                                                                                         (21 rows)
+                                                                                         (20 rows)
 
              ----
              /program?degree={'ba','bs'}
              | ba      |
              | ba      |
              | ba      |
-             | bs      |
+             | ms      |
              | ph      |
              | bs      |
              | bs      |
              | School of Engineering         |                     2 |
              | School of Arts and Humanities |                     3 |
              | School of Music & Dance       |                     0 |
-             | School of Natural Sciences    |                     2 |
+             | School of Natural Sciences    |                     3 |
              | Public Honorariums            |                     0 |
              | School of Continuing Studies  |                     0 |
                                                               (9 rows)
              | degree | count(program) |
             -+--------+----------------+-
              | ba     |             10 |
-             | bs     |             11 |
+             | bs     |             10 |
              | ct     |              4 |
              | ma     |              7 |
-             | ms     |              5 |
+             | ms     |              6 |
              | pb     |              1 |
              | ph     |              1 |
                                 (7 rows)
              | ba             |
              | bs             |
              | ma             |
-                       (3 rows)
+             | ms             |
+                       (4 rows)
 
              ----
              /(program^degree)?count(program)>5
              | degree | count(^) |
             -+--------+----------+-
              | ba     |       10 |
-             | bs     |       11 |
+             | bs     |       10 |
              | ct     |        4 |
              | ma     |        7 |
-             | ms     |        5 |
+             | ms     |        6 |
              | pb     |        1 |
              | ph     |        1 |
                           (7 rows)
              :             :          : Science                          :        :              :
              | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
              | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              :             :          : History                          :        :              :
              | art         | uhist    | Bachelor of Arts in Art History  | ba     |              |
              | art         | ustudio  | Bachelor of Arts in Studio Art   | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              | eng         | ucompsci | B.S. in Computer Science         | bs     |              |
              | eng         | uelec    | B.S. in Electrical Engineering   | bs     | gee          |
              | eng         | umech    | B.S. in Mechanical Engineering   | bs     | gme          |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              | bus         | ubusad   | Bachelor of Business             | bs     |              |
              :             :          : Administration                   :        :              :
              | bus         | uecon    | Bachelor of Arts in Economics    | ba     | gecon        |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              | ns          | umth     | Bachelor of Science in           | bs     | gmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | uphys    | Bachelor of Science in Physics   | bs     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
                |      +---------------------------------------------------------+                                   |                                   |
                | code | count(program?degree='ph') | count(program?degree='bs') | count(school.program?degree='ph') | count(school.program?degree='bs') |
               -+------+----------------------------+----------------------------+-----------------------------------+-----------------------------------+-
-               | mth  |                          1 |                          5 |                                 1 |                                 5 |
+               | mth  |                          1 |                          4 |                                 1 |                                 4 |
                                                                                                                                                   (1 row)
 
                ----
                | eng  | gee   | ms     |         1 |
                | eng  | gme   | ms     |         1 |
                | la   | gengl | ma     |         1 |
-               | ns   | gmth  | bs     |         1 |
+               | ns   | gmth  | ms     |         1 |
                | ns   | pmth  | ph     |         1 |
                                             (7 rows)
 
                +----------------+
                | degree         |
               -+----------------+-
-               | bs             |
+               | ba             |
                           (1 row)
 
                ----
                +----------------+
                | degree         |
               -+----------------+-
-               | bs             |
+               | ba             |
                           (1 row)
 
                ----
                | degree     | count(^)     |
               -+------------+--------------+-
                | ba         |           10 |
-               | bs         |           11 |
+               | bs         |           10 |
                | ct         |            4 |
                | ma         |            7 |
-               | ms         |            5 |
+               | ms         |            6 |
                | pb         |            1 |
                | ph         |            1 |
                                     (7 rows)
                | degree  | count(program)  |
               -+---------+-----------------+-
                | ba      |              10 |
-               | bs      |              11 |
+               | bs      |              10 |
                | ct      |               4 |
                | ma      |               7 |
-               | ms      |               5 |
+               | ms      |               6 |
                | pb      |               1 |
                | ph      |               1 |
                                     (7 rows)
                | degree | count(^.student) |
               -+--------+------------------+-
                | ba     |              102 |
-               | bs     |              106 |
+               | bs     |               93 |
                | ct     |               37 |
                | ma     |               77 |
-               | ms     |               36 |
+               | ms     |               49 |
                | pb     |               16 |
                | ph     |               10 |
                                     (7 rows)
                | degree | count(program.student) |
               -+--------+------------------------+-
                | ba     |                    102 |
-               | bs     |                    106 |
+               | bs     |                     93 |
                | ct     |                     37 |
                | ma     |                     77 |
-               | ms     |                     36 |
+               | ms     |                     49 |
                | pb     |                     16 |
                | ph     |                     10 |
                                           (7 rows)
                | ct                        |
                | ma                        |
                | bs                        |
+               | ms                        |
                | ph                        |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree})
                | ct                        |
                | ma                        |
                | bs                        |
+               | ms                        |
                | ph                        |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree}){*}
                | ba         |            5 |
                | ct         |            1 |
                | ma         |            3 |
-               | bs         |            5 |
+               | bs         |            4 |
+               | ms         |            1 |
                | ph         |            1 |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree}){*,count(^)}
                | ba     |               33 |
                | ct     |                5 |
                | ma     |               34 |
-               | bs     |               51 |
+               | bs     |               38 |
+               | ms     |               13 |
                | ph     |               10 |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree}){*,count(^.student)}
                | ct                                      |
                | ma                                      |
                | bs                                      |
+               | ms                                      |
                | ph                                      |
                | --                                      |
-                                                 (18 rows)
+                                                 (19 rows)
 
                ----
                /school.distinct(program{degree:if_null('--')})
                | degree | count(^) |
               -+--------+----------+-
                | ba     |       10 |
-               | bs     |       11 |
+               | bs     |       10 |
                | ma     |        7 |
-                            (3 rows)
+               | ms     |        6 |
+                            (4 rows)
 
                ----
                /program^degree{*,count(^)}?count(^)>5
                | ct             |
                | ma             |
                | bs             |
+               | ms             |
                | ph             |
-                        (17 rows)
+                        (18 rows)
 
                ----
                /school.(program^degree)
                | ba                    |
                | pb                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | bs                    |
                | ms                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | bs                    |
                | ms                    |
                | ct                    |
                | ma                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | ba                    |
                | ct                    |
                | ct                    |
                | ma                    |
                | ms                    |
-                               (55 rows)
+                               (59 rows)
 
                ----
                /department.(school.program^degree)
                | eng         | ucompsci | B.S. in Computer Science         | bs     |              |
                | eng         | uelec    | B.S. in Electrical Engineering   | bs     | gee          |
                | eng         | umech    | B.S. in Mechanical Engineering   | bs     | gme          |
-               | ns          | gmth     | Masters of Science in            | bs     | pmth         |
-               :             :          : Mathematics                      :        :              :
                | ns          | uastro   | Bachelor of Science in Astronomy | bs     |              |
                | ns          | uchem    | Bachelor of Science in Chemistry | bs     |              |
                | ns          | umth     | Bachelor of Science in           | bs     | gmth         |
                | eng         | gbuseng  | M.S. in Business and Engineering | ms     |              |
                | eng         | gee      | M.S. in Electrical Engineering   | ms     |              |
                | eng         | gme      | M.S. in Mechanical Engineering   | ms     |              |
+               | ns          | gmth     | Masters of Science in            | ms     | pmth         |
+               :             :          : Mathematics                      :        :              :
                | art         | gart     | Post Baccalaureate in Art        | pb     |              |
                :             :          : History                          :        :              :
                | ns          | pmth     | Doctorate of Science in          | ph     |              |
                | eng         | umech    | B.S. in Mechanical Engineering   | bs     | gme          |             11 |
                | ns          | uchem    | Bachelor of Science in Chemistry | bs     |              |             11 |
                | eng         | ucompsci | B.S. in Computer Science         | bs     |              |             12 |
-               | ns          | gmth     | Masters of Science in            | bs     | pmth         |             13 |
-               :             :          : Mathematics                      :        :              :                :
                | ns          | umth     | Bachelor of Science in           | bs     | gmth         |             13 |
                :             :          : Mathematics                      :        :              :                :
                | la          | psciwri  | Science Writing                  | ct     |              |              5 |
                | eng         | gbe      | M.S. in Bioengineering           | ms     |              |              8 |
                | eng         | gbuseng  | M.S. in Business and Engineering | ms     |              |              9 |
                | edu         | gedu     | M.S. in Education                | ms     |              |             11 |
+               | ns          | gmth     | Masters of Science in            | ms     | pmth         |             13 |
+               :             :          : Mathematics                      :        :              :                :
                | art         | gart     | Post Baccalaureate in Art        | pb     |              |             16 |
                :             :          : History                          :        :              :                :
                | ns          | pmth     | Doctorate of Science in          | ph     |              |             10 |
                | degree | exists(^) | count(^) |
               -+--------+-----------+----------+-
                | ba     | true      |       10 |
-               | bs     | true      |       11 |
+               | bs     | true      |       10 |
                | ct     | true      |        4 |
                | ma     | true      |        7 |
-               | ms     | true      |        5 |
+               | ms     | true      |        6 |
                | pb     | true      |        1 |
                | ph     | true      |        1 |
                                         (7 rows)
                | eng  |              8 |                                2 |
                | la   |              9 |                                3 |
                | mus  |              0 |                                0 |
-               | ns   |              6 |                                2 |
+               | ns   |              6 |                                3 |
                | ph   |              1 |                                0 |
                | sc   |              0 |                                0 |
                                                                    (9 rows)
                | eng  |              8 |                     2 |
                | la   |              9 |                     3 |
                | mus  |              0 |                     0 |
-               | ns   |              6 |                     2 |
+               | ns   |              6 |                     3 |
                | ph   |              1 |                     0 |
                | sc   |              0 |                     0 |
                                                         (9 rows)
                | degree | count(^) | count(^.student) |
               -+--------+----------+------------------+-
                | ba     |       10 |              102 |
-               | bs     |       11 |              106 |
+               | bs     |       10 |               93 |
                | ct     |        4 |               37 |
                | ma     |        7 |               77 |
-               | ms     |        5 |               36 |
+               | ms     |        6 |               49 |
                | pb     |        1 |               16 |
                | ph     |        1 |               10 |
                                                (7 rows)
                | degree | count(^) | count(^.student) |
               -+--------+----------+------------------+-
                | ba     |       10 |              102 |
-               | bs     |       11 |              106 |
+               | bs     |       10 |               93 |
                | ct     |        4 |               37 |
                | ma     |        7 |               77 |
-               | ms     |        5 |               36 |
+               | ms     |        6 |               49 |
                | pb     |        1 |               16 |
                | ph     |        1 |               10 |
                                                (7 rows)
                | degree | count(^) | count(^.student) |
               -+--------+----------+------------------+-
                | ba     |       10 |              102 |
-               | bs     |       11 |              106 |
+               | bs     |       10 |               93 |
                | ct     |        4 |               37 |
                | ma     |        7 |               77 |
-               | ms     |        5 |               36 |
+               | ms     |        6 |               49 |
                | pb     |        1 |               16 |
                | ph     |        1 |               10 |
                                                (7 rows)
              | la          | gengl | Master of Arts in English      | ma     |              |
              | ns          | pmth  | Doctorate of Science in        | ph     |              |
              :             :       : Mathematics                    :        :              :
-             | ns          | gmth  | Masters of Science in          | bs     | pmth         |
+             | ns          | gmth  | Masters of Science in          | ms     | pmth         |
              :             :       : Mathematics                    :        :              :
                                                                                      (7 rows)
 
              | gee   | M.S. in Electrical Engineering | ms     |
              | gme   | M.S. in Mechanical Engineering | ms     |
              | gengl | Master of Arts in English      | ma     |
-             | gmth  | Masters of Science in          | bs     |
+             | gmth  | Masters of Science in          | ms     |
              :       : Mathematics                    :        :
              | pmth  | Doctorate of Science in        | ph     |
              :       : Mathematics                    :        :

File test/output/oracle.yaml

              :             :          : Science                          :        :              :
              | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
              | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              :             :          : Science                          :        :              :
              | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
              | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
-             :             :          : Mathematics                      :        :              :
              | ns          | uastro   | Bachelor of Science in Astronomy | bs     |              |
              | ns          | uchem    | Bachelor of Science in Chemistry | bs     |              |
              | ns          | umth     | Bachelor of Science in           | bs     | gmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | uphys    | Bachelor of Science in Physics   | bs     |              |
-                                                                                         (21 rows)
+                                                                                         (20 rows)
 
              ----
              /program?degree={'ba','bs'}
              | ba      |
              | ba      |
              | ba      |
-             | bs      |
+             | ms      |
              | ph      |
              | bs      |
              | bs      |
              | School of Engineering         |                     2 |
              | School of Arts and Humanities |                     3 |
              | School of Music & Dance       |                     0 |
-             | School of Natural Sciences    |                     2 |
+             | School of Natural Sciences    |                     3 |
              | Public Honorariums            |                     0 |
              | School of Continuing Studies  |                     0 |
                                                               (9 rows)
              | degree | count(program) |
             -+--------+----------------+-
              | ba     |             10 |
-             | bs     |             11 |
+             | bs     |             10 |
              | ct     |              4 |
              | ma     |              7 |
-             | ms     |              5 |
+             | ms     |              6 |
              | pb     |              1 |
              | ph     |              1 |
                                 (7 rows)
              | ba             |
              | bs             |
              | ma             |
-                       (3 rows)
+             | ms             |
+                       (4 rows)
 
              ----
              /(program^degree)?count(program)>5
              | degree | count(^) |
             -+--------+----------+-
              | ba     |       10 |
-             | bs     |       11 |
+             | bs     |       10 |
              | ct     |        4 |
              | ma     |        7 |
-             | ms     |        5 |
+             | ms     |        6 |
              | pb     |        1 |
              | ph     |        1 |
                           (7 rows)
              :             :          : Science                          :        :              :
              | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
              | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              :             :          : History                          :        :              :
              | art         | uhist    | Bachelor of Arts in Art History  | ba     |              |
              | art         | ustudio  | Bachelor of Arts in Studio Art   | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              | eng         | ucompsci | B.S. in Computer Science         | bs     |              |
              | eng         | uelec    | B.S. in Electrical Engineering   | bs     | gee          |
              | eng         | umech    | B.S. in Mechanical Engineering   | bs     | gme          |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              | bus         | ubusad   | Bachelor of Business             | bs     |              |
              :             :          : Administration                   :        :              :
              | bus         | uecon    | Bachelor of Arts in Economics    | ba     | gecon        |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              | ns          | umth     | Bachelor of Science in           | bs     | gmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | uphys    | Bachelor of Science in Physics   | bs     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
                |      +---------------------------------------------------------+                                   |                                   |
                | code | count(program?degree='ph') | count(program?degree='bs') | count(school.program?degree='ph') | count(school.program?degree='bs') |
               -+------+----------------------------+----------------------------+-----------------------------------+-----------------------------------+-
-               | mth  |                          1 |                          5 |                                 1 |                                 5 |
+               | mth  |                          1 |                          4 |                                 1 |                                 4 |
                                                                                                                                                   (1 row)
 
                ----
                | eng  | gee   | ms     |         1 |
                | eng  | gme   | ms     |         1 |
                | la   | gengl | ma     |         1 |
-               | ns   | gmth  | bs     |         1 |
+               | ns   | gmth  | ms     |         1 |
                | ns   | pmth  | ph     |         1 |
                                             (7 rows)
 
                +----------------+
                | degree         |
               -+----------------+-
-               | bs             |
+               | ba             |
                           (1 row)
 
                ----
                +----------------+
                | degree         |
               -+----------------+-
-               | bs             |
+               | ba             |
                           (1 row)
 
                ----
                | degree     | count(^)     |
               -+------------+--------------+-
                | ba         |           10 |
-               | bs         |           11 |
+               | bs         |           10 |
                | ct         |            4 |
                | ma         |            7 |
-               | ms         |            5 |
+               | ms         |            6 |
                | pb         |            1 |
                | ph         |            1 |
                                     (7 rows)
                | degree  | count(program)  |
               -+---------+-----------------+-
                | ba      |              10 |
-               | bs      |              11 |
+               | bs      |              10 |
                | ct      |               4 |
                | ma      |               7 |
-               | ms      |               5 |
+               | ms      |               6 |
                | pb      |               1 |
                | ph      |               1 |
                                     (7 rows)
                | degree | count(^.student) |
               -+--------+------------------+-
                | ba     |              102 |
-               | bs     |              106 |
+               | bs     |               93 |
                | ct     |               37 |
                | ma     |               77 |
-               | ms     |               36 |
+               | ms     |               49 |
                | pb     |               16 |
                | ph     |               10 |
                                     (7 rows)
                | degree | count(program.student) |
               -+--------+------------------------+-
                | ba     |                    102 |
-               | bs     |                    106 |
+               | bs     |                     93 |
                | ct     |                     37 |
                | ma     |                     77 |
-               | ms     |                     36 |
+               | ms     |                     49 |
                | pb     |                     16 |
                | ph     |                     10 |
                                           (7 rows)
                | ct                        |
                | ma                        |
                | bs                        |
+               | ms                        |
                | ph                        |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree})
                | ct                        |
                | ma                        |
                | bs                        |
+               | ms                        |
                | ph                        |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree}){*}
                | ba         |            5 |
                | ct         |            1 |
                | ma         |            3 |
-               | bs         |            5 |
+               | bs         |            4 |
+               | ms         |            1 |
                | ph         |            1 |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree}){*,count(^)}
                | ba     |               33 |
                | ct     |                5 |
                | ma     |               34 |
-               | bs     |               51 |
+               | bs     |               38 |
+               | ms     |               13 |
                | ph     |               10 |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree}){*,count(^.student)}
                | ct                                      |
                | ma                                      |
                | bs                                      |
+               | ms                                      |
                | ph                                      |
                | --                                      |
-                                                 (18 rows)
+                                                 (19 rows)
 
                ----
                /school.distinct(program{degree:if_null('--')})
                | degree | count(^) |
               -+--------+----------+-
                | ba     |       10 |
-               | bs     |       11 |
+               | bs     |       10 |
                | ma     |        7 |
-                            (3 rows)
+               | ms     |        6 |
+                            (4 rows)
 
                ----
                /program^degree{*,count(^)}?count(^)>5
                | ct             |
                | ma             |
                | bs             |
+               | ms             |
                | ph             |
-                        (17 rows)
+                        (18 rows)
 
                ----
                /school.(program^degree)
                | ba                    |
                | pb                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | bs                    |
                | ms                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | bs                    |
                | ms                    |
                | ct                    |
                | ma                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | ba                    |
                | ct                    |
                | ct                    |
                | ma                    |
                | ms                    |
-                               (55 rows)
+                               (59 rows)
 
                ----
                /department.(school.program^degree)
                | eng         | ucompsci | B.S. in Computer Science         | bs     |              |
                | eng         | uelec    | B.S. in Electrical Engineering   | bs     | gee          |
                | eng         | umech    | B.S. in Mechanical Engineering   | bs     | gme          |
-               | ns          | gmth     | Masters of Science in            | bs     | pmth         |
-               :             :          : Mathematics                      :        :              :
                | ns          | uastro   | Bachelor of Science in Astronomy | bs     |              |
                | ns          | uchem    | Bachelor of Science in Chemistry | bs     |              |
                | ns          | umth     | Bachelor of Science in           | bs     | gmth         |
                | eng         | gbuseng  | M.S. in Business and Engineering | ms     |              |
                | eng         | gee      | M.S. in Electrical Engineering   | ms     |              |
                | eng         | gme      | M.S. in Mechanical Engineering   | ms     |              |
+               | ns          | gmth     | Masters of Science in            | ms     | pmth         |
+               :             :          : Mathematics                      :        :              :
                | art         | gart     | Post Baccalaureate in Art        | pb     |              |
                :             :          : History                          :        :              :
                | ns          | pmth     | Doctorate of Science in          | ph     |              |
                | eng         | umech    | B.S. in Mechanical Engineering   | bs     | gme          |             11 |
                | ns          | uchem    | Bachelor of Science in Chemistry | bs     |              |             11 |
                | eng         | ucompsci | B.S. in Computer Science         | bs     |              |             12 |
-               | ns          | gmth     | Masters of Science in            | bs     | pmth         |             13 |
-               :             :          : Mathematics                      :        :              :                :
                | ns          | umth     | Bachelor of Science in           | bs     | gmth         |             13 |
                :             :          : Mathematics                      :        :              :                :
                | la          | psciwri  | Science Writing                  | ct     |              |              5 |
                | eng         | gbe      | M.S. in Bioengineering           | ms     |              |              8 |
                | eng         | gbuseng  | M.S. in Business and Engineering | ms     |              |              9 |
                | edu         | gedu     | M.S. in Education                | ms     |              |             11 |
+               | ns          | gmth     | Masters of Science in            | ms     | pmth         |             13 |
+               :             :          : Mathematics                      :        :              :                :
                | art         | gart     | Post Baccalaureate in Art        | pb     |              |             16 |
                :             :          : History                          :        :              :                :
                | ns          | pmth     | Doctorate of Science in          | ph     |              |             10 |
                | eng  |              8 |                                2 |
                | la   |              9 |                                3 |
                | mus  |              0 |                                0 |
-               | ns   |              6 |                                2 |
+               | ns   |              6 |                                3 |
                | ph   |              1 |                                0 |
                | sc   |              0 |                                0 |
                                                                    (9 rows)
                | eng  |              8 |                     2 |
                | la   |              9 |                     3 |
                | mus  |              0 |                     0 |
-               | ns   |              6 |                     2 |
+               | ns   |              6 |                     3 |
                | ph   |              1 |                     0 |
                | sc   |              0 |                     0 |
                                                         (9 rows)
                | degree | count(^) | count(^.student) |
               -+--------+----------+------------------+-
                | ba     |       10 |              102 |
-               | bs     |       11 |              106 |
+               | bs     |       10 |               93 |
                | ct     |        4 |               37 |
                | ma     |        7 |               77 |
-               | ms     |        5 |               36 |
+               | ms     |        6 |               49 |
                | pb     |        1 |               16 |
                | ph     |        1 |               10 |
                                                (7 rows)
                | degree | count(^) | count(^.student) |
               -+--------+----------+------------------+-
                | ba     |       10 |              102 |
-               | bs     |       11 |              106 |
+               | bs     |       10 |               93 |
                | ct     |        4 |               37 |
                | ma     |        7 |               77 |
-               | ms     |        5 |               36 |
+               | ms     |        6 |               49 |
                | pb     |        1 |               16 |
                | ph     |        1 |               10 |
                                                (7 rows)
                | degree | count(^) | count(^.student) |
               -+--------+----------+------------------+-
                | ba     |       10 |              102 |
-               | bs     |       11 |              106 |
+               | bs     |       10 |               93 |
                | ct     |        4 |               37 |
                | ma     |        7 |               77 |
-               | ms     |        5 |               36 |
+               | ms     |        6 |               49 |
                | pb     |        1 |               16 |
                | ph     |        1 |               10 |
                                                (7 rows)
              | la          | gengl | Master of Arts in English      | ma     |              |
              | ns          | pmth  | Doctorate of Science in        | ph     |              |
              :             :       : Mathematics                    :        :              :
-             | ns          | gmth  | Masters of Science in          | bs     | pmth         |
+             | ns          | gmth  | Masters of Science in          | ms     | pmth         |
              :             :       : Mathematics                    :        :              :
                                                                                      (7 rows)
 
              | gee   | M.S. in Electrical Engineering | ms     |
              | gme   | M.S. in Mechanical Engineering | ms     |
              | gengl | Master of Arts in English      | ma     |
-             | gmth  | Masters of Science in          | bs     |
+             | gmth  | Masters of Science in          | ms     |
              :       : Mathematics                    :        :
              | pmth  | Doctorate of Science in        | ph     |
              :       : Mathematics                    :        :

File test/output/pgsql.yaml

              :             :          : Science                          :        :              :
              | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
              | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              :             :          : Science                          :        :              :
              | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
              | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
-             :             :          : Mathematics                      :        :              :
              | ns          | uastro   | Bachelor of Science in Astronomy | bs     |              |
              | ns          | uchem    | Bachelor of Science in Chemistry | bs     |              |
              | ns          | umth     | Bachelor of Science in           | bs     | gmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | uphys    | Bachelor of Science in Physics   | bs     |              |
-                                                                                         (21 rows)
+                                                                                         (20 rows)
 
              ----
              /program?degree={'ba','bs'}
              | ba      |
              | ba      |
              | ba      |
-             | bs      |
+             | ms      |
              | ph      |
              | bs      |
              | bs      |
              | School of Engineering         |                     2 |
              | School of Arts and Humanities |                     3 |
              | School of Music & Dance       |                     0 |
-             | School of Natural Sciences    |                     2 |
+             | School of Natural Sciences    |                     3 |
              | Public Honorariums            |                     0 |
              | School of Continuing Studies  |                     0 |
                                                               (9 rows)
              | degree | count(program) |
             -+--------+----------------+-
              | ba     |             10 |
-             | bs     |             11 |
+             | bs     |             10 |
              | ct     |              4 |
              | ma     |              7 |
-             | ms     |              5 |
+             | ms     |              6 |
              | pb     |              1 |
              | ph     |              1 |
                                 (7 rows)
              | ba             |
              | bs             |
              | ma             |
-                       (3 rows)
+             | ms             |
+                       (4 rows)
 
              ----
              /(program^degree)?count(program)>5
              | degree | count(^) |
             -+--------+----------+-
              | ba     |       10 |
-             | bs     |       11 |
+             | bs     |       10 |
              | ct     |        4 |
              | ma     |        7 |
-             | ms     |        5 |
+             | ms     |        6 |
              | pb     |        1 |
              | ph     |        1 |
                           (7 rows)
              :             :          : Science                          :        :              :
              | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
              | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              :             :          : History                          :        :              :
              | art         | uhist    | Bachelor of Arts in Art History  | ba     |              |
              | art         | ustudio  | Bachelor of Arts in Studio Art   | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              | eng         | ucompsci | B.S. in Computer Science         | bs     |              |
              | eng         | uelec    | B.S. in Electrical Engineering   | bs     | gee          |
              | eng         | umech    | B.S. in Mechanical Engineering   | bs     | gme          |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              | bus         | ubusad   | Bachelor of Business             | bs     |              |
              :             :          : Administration                   :        :              :
              | bus         | uecon    | Bachelor of Arts in Economics    | ba     | gecon        |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              | ns          | umth     | Bachelor of Science in           | bs     | gmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | uphys    | Bachelor of Science in Physics   | bs     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
                |      +---------------------------------------------------------+                                   |                                   |
                | code | count(program?degree='ph') | count(program?degree='bs') | count(school.program?degree='ph') | count(school.program?degree='bs') |
               -+------+----------------------------+----------------------------+-----------------------------------+-----------------------------------+-
-               | mth  |                          1 |                          5 |                                 1 |                                 5 |
+               | mth  |                          1 |                          4 |                                 1 |                                 4 |
                                                                                                                                                   (1 row)
 
                ----
                | eng  | gee   | ms     |         1 |
                | eng  | gme   | ms     |         1 |
                | la   | gengl | ma     |         1 |
-               | ns   | gmth  | bs     |         1 |
+               | ns   | gmth  | ms     |         1 |
                | ns   | pmth  | ph     |         1 |
                                             (7 rows)
 
                +----------------+
                | degree         |
               -+----------------+-
-               | bs             |
+               | ba             |
                           (1 row)
 
                ----
                +----------------+
                | degree         |
               -+----------------+-
-               | bs             |
+               | ba             |
                           (1 row)
 
                ----
                | degree     | count(^)     |
               -+------------+--------------+-
                | ba         |           10 |
-               | bs         |           11 |
+               | bs         |           10 |
                | ct         |            4 |
                | ma         |            7 |
-               | ms         |            5 |
+               | ms         |            6 |
                | pb         |            1 |
                | ph         |            1 |
                                     (7 rows)
                | degree  | count(program)  |
               -+---------+-----------------+-
                | ba      |              10 |
-               | bs      |              11 |
+               | bs      |              10 |
                | ct      |               4 |
                | ma      |               7 |
-               | ms      |               5 |
+               | ms      |               6 |
                | pb      |               1 |
                | ph      |               1 |
                                     (7 rows)
                | degree | count(^.student) |
               -+--------+------------------+-
                | ba     |              102 |
-               | bs     |              106 |
+               | bs     |               93 |
                | ct     |               37 |
                | ma     |               77 |
-               | ms     |               36 |
+               | ms     |               49 |
                | pb     |               16 |
                | ph     |               10 |
                                     (7 rows)
                | degree | count(program.student) |
               -+--------+------------------------+-
                | ba     |                    102 |
-               | bs     |                    106 |
+               | bs     |                     93 |
                | ct     |                     37 |
                | ma     |                     77 |
-               | ms     |                     36 |
+               | ms     |                     49 |
                | pb     |                     16 |
                | ph     |                     10 |
                                           (7 rows)
                | ct                        |
                | ma                        |
                | bs                        |
+               | ms                        |
                | ph                        |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree})
                | ct                        |
                | ma                        |
                | bs                        |
+               | ms                        |
                | ph                        |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree}){*}
                | ba         |            5 |
                | ct         |            1 |
                | ma         |            3 |
-               | bs         |            5 |
+               | bs         |            4 |
+               | ms         |            1 |
                | ph         |            1 |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree}){*,count(^)}
                | ba     |               33 |
                | ct     |                5 |
                | ma     |               34 |
-               | bs     |               51 |
+               | bs     |               38 |
+               | ms     |               13 |
                | ph     |               10 |
-                                   (17 rows)
+                                   (18 rows)
 
                ----
                /school.distinct(program{degree}){*,count(^.student)}
                | ct                                      |
                | ma                                      |
                | bs                                      |
+               | ms                                      |
                | ph                                      |
                | --                                      |
-                                                 (18 rows)
+                                                 (19 rows)
 
                ----
                /school.distinct(program{degree:if_null('--')})
                | degree | count(^) |
               -+--------+----------+-
                | ba     |       10 |
-               | bs     |       11 |
+               | bs     |       10 |
                | ma     |        7 |
-                            (3 rows)
+               | ms     |        6 |
+                            (4 rows)
 
                ----
                /program^degree{*,count(^)}?count(^)>5
                | ct             |
                | ma             |
                | bs             |
+               | ms             |
                | ph             |
-                        (17 rows)
+                        (18 rows)
 
                ----
                /school.(program^degree)
                | ba                    |
                | pb                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | bs                    |
                | ms                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | bs                    |
                | ms                    |
                | ct                    |
                | ma                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | bs                    |
+               | ms                    |
                | ph                    |
                | ba                    |
                | ct                    |
                | ct                    |
                | ma                    |
                | ms                    |
-                               (55 rows)
+                               (59 rows)
 
                ----
                /department.(school.program^degree)
                | eng         | ucompsci | B.S. in Computer Science         | bs     |              |
                | eng         | uelec    | B.S. in Electrical Engineering   | bs     | gee          |
                | eng         | umech    | B.S. in Mechanical Engineering   | bs     | gme          |
-               | ns          | gmth     | Masters of Science in            | bs     | pmth         |
-               :             :          : Mathematics                      :        :              :
                | ns          | uastro   | Bachelor of Science in Astronomy | bs     |              |
                | ns          | uchem    | Bachelor of Science in Chemistry | bs     |              |
                | ns          | umth     | Bachelor of Science in           | bs     | gmth         |
                | eng         | gbuseng  | M.S. in Business and Engineering | ms     |              |
                | eng         | gee      | M.S. in Electrical Engineering   | ms     |              |
                | eng         | gme      | M.S. in Mechanical Engineering   | ms     |              |
+               | ns          | gmth     | Masters of Science in            | ms     | pmth         |
+               :             :          : Mathematics                      :        :              :
                | art         | gart     | Post Baccalaureate in Art        | pb     |              |
                :             :          : History                          :        :              :
                | ns          | pmth     | Doctorate of Science in          | ph     |              |
                | eng         | umech    | B.S. in Mechanical Engineering   | bs     | gme          |             11 |
                | ns          | uchem    | Bachelor of Science in Chemistry | bs     |              |             11 |
                | eng         | ucompsci | B.S. in Computer Science         | bs     |              |             12 |
-               | ns          | gmth     | Masters of Science in            | bs     | pmth         |             13 |
-               :             :          : Mathematics                      :        :              :                :
                | ns          | umth     | Bachelor of Science in           | bs     | gmth         |             13 |
                :             :          : Mathematics                      :        :              :                :
                | la          | psciwri  | Science Writing                  | ct     |              |              5 |
                | eng         | gbe      | M.S. in Bioengineering           | ms     |              |              8 |
                | eng         | gbuseng  | M.S. in Business and Engineering | ms     |              |              9 |
                | edu         | gedu     | M.S. in Education                | ms     |              |             11 |
+               | ns          | gmth     | Masters of Science in            | ms     | pmth         |             13 |
+               :             :          : Mathematics                      :        :              :                :
                | art         | gart     | Post Baccalaureate in Art        | pb     |              |             16 |
                :             :          : History                          :        :              :                :
                | ns          | pmth     | Doctorate of Science in          | ph     |              |             10 |
                | degree | exists(^) | count(^) |
               -+--------+-----------+----------+-
                | ba     | true      |       10 |
-               | bs     | true      |       11 |
+               | bs     | true      |       10 |
                | ct     | true      |        4 |
                | ma     | true      |        7 |
-               | ms     | true      |        5 |
+               | ms     | true      |        6 |
                | pb     | true      |        1 |
                | ph     | true      |        1 |
                                         (7 rows)
                | eng  |              8 |                                2 |
                | la   |              9 |                                3 |
                | mus  |              0 |                                0 |
-               | ns   |              6 |                                2 |
+               | ns   |              6 |                                3 |
                | ph   |              1 |                                0 |
                | sc   |              0 |                                0 |
                                                                    (9 rows)
                | eng  |              8 |                     2 |
                | la   |              9 |                     3 |
                | mus  |              0 |                     0 |
-               | ns   |              6 |                     2 |
+               | ns   |              6 |                     3 |
                | ph   |              1 |                     0 |
                | sc   |              0 |                     0 |
                                                         (9 rows)
                | degree | count(^) | count(^.student) |
               -+--------+----------+------------------+-
                | ba     |       10 |              102 |
-               | bs     |       11 |              106 |
+               | bs     |       10 |               93 |
                | ct     |        4 |               37 |
                | ma     |        7 |               77 |
-               | ms     |        5 |               36 |
+               | ms     |        6 |               49 |
                | pb     |        1 |               16 |
                | ph     |        1 |               10 |
                                                (7 rows)
                | degree | count(^) | count(^.student) |
               -+--------+----------+------------------+-
                | ba     |       10 |              102 |
-               | bs     |       11 |              106 |
+               | bs     |       10 |               93 |
                | ct     |        4 |               37 |
                | ma     |        7 |               77 |
-               | ms     |        5 |               36 |
+               | ms     |        6 |               49 |
                | pb     |        1 |               16 |
                | ph     |        1 |               10 |
                                                (7 rows)
                | degree | count(^) | count(^.student) |
               -+--------+----------+------------------+-
                | ba     |       10 |              102 |
-               | bs     |       11 |              106 |
+               | bs     |       10 |               93 |
                | ct     |        4 |               37 |
                | ma     |        7 |               77 |
-               | ms     |        5 |               36 |
+               | ms     |        6 |               49 |
                | pb     |        1 |               16 |
                | ph     |        1 |               10 |
                                                (7 rows)
              | la          | gengl | Master of Arts in English      | ma     |              |
              | ns          | pmth  | Doctorate of Science in        | ph     |              |
              :             :       : Mathematics                    :        :              :
-             | ns          | gmth  | Masters of Science in          | bs     | pmth         |
+             | ns          | gmth  | Masters of Science in          | ms     | pmth         |
              :             :       : Mathematics                    :        :              :
                                                                                      (7 rows)
 
              | gee   | M.S. in Electrical Engineering | ms     |
              | gme   | M.S. in Mechanical Engineering | ms     |
              | gengl | Master of Arts in English      | ma     |
-             | gmth  | Masters of Science in          | bs     |
+             | gmth  | Masters of Science in          | ms     |
              :       : Mathematics                    :        :
              | pmth  | Doctorate of Science in        | ph     |
              :       : Mathematics                    :        :

File test/output/sqlite.yaml

              :             :          : Science                          :        :              :
              | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
              | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              :             :          : Science                          :        :              :
              | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
              | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
-             :             :          : Mathematics                      :        :              :
              | ns          | uastro   | Bachelor of Science in Astronomy | bs     |              |
              | ns          | uchem    | Bachelor of Science in Chemistry | bs     |              |
              | ns          | umth     | Bachelor of Science in           | bs     | gmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | uphys    | Bachelor of Science in Physics   | bs     |              |
-                                                                                         (21 rows)
+                                                                                         (20 rows)
 
              ----
              /program?degree={'ba','bs'}
              | ba      |
              | ba      |
              | ba      |
-             | bs      |
+             | ms      |
              | ph      |
              | bs      |
              | bs      |
              | School of Engineering         |                     2 |
              | School of Arts and Humanities |                     3 |
              | School of Music & Dance       |                     0 |
-             | School of Natural Sciences    |                     2 |
+             | School of Natural Sciences    |                     3 |
              | Public Honorariums            |                     0 |
              | School of Continuing Studies  |                     0 |
                                                               (9 rows)
              | degree | count(program) |
             -+--------+----------------+-
              | ba     |             10 |
-             | bs     |             11 |
+             | bs     |             10 |
              | ct     |              4 |
              | ma     |              7 |
-             | ms     |              5 |
+             | ms     |              6 |
              | pb     |              1 |
              | ph     |              1 |
                                 (7 rows)
              | ba             |
              | bs             |
              | ma             |
-                       (3 rows)
+             | ms             |
+                       (4 rows)
 
              ----
              /(program^degree)?count(program)>5
              | degree | count(^) |
             -+--------+----------+-
              | ba     |       10 |
-             | bs     |       11 |
+             | bs     |       10 |
              | ct     |        4 |
              | ma     |        7 |
-             | ms     |        5 |
+             | ms     |        6 |
              | pb     |        1 |
              | ph     |        1 |
                           (7 rows)
              :             :          : Science                          :        :              :
              | la          | upsych   | Bachelor of Arts in Psychology   | ba     |              |
              | la          | uspan    | Bachelor of Arts in Spanish      | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              :             :          : History                          :        :              :
              | art         | uhist    | Bachelor of Arts in Art History  | ba     |              |
              | art         | ustudio  | Bachelor of Arts in Studio Art   | ba     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              | eng         | ucompsci | B.S. in Computer Science         | bs     |              |
              | eng         | uelec    | B.S. in Electrical Engineering   | bs     | gee          |
              | eng         | umech    | B.S. in Mechanical Engineering   | bs     | gme          |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              | bus         | ubusad   | Bachelor of Business             | bs     |              |
              :             :          : Administration                   :        :              :
              | bus         | uecon    | Bachelor of Arts in Economics    | ba     | gecon        |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
              | ns          | umth     | Bachelor of Science in           | bs     | gmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | uphys    | Bachelor of Science in Physics   | bs     |              |
-             | ns          | gmth     | Masters of Science in            | bs     | pmth         |
+             | ns          | gmth     | Masters of Science in            | ms     | pmth         |
              :             :          : Mathematics                      :        :              :
              | ns          | pmth     | Doctorate of Science in          | ph     |              |
              :             :          : Mathematics                      :        :              :
                |      +---------------------------------------------------------+                                   |                                   |
                | code | count(program?degree='ph') | count(program?degree='bs') | count(school.program?degree='ph') | count(school.program?degree='bs') |
               -+------+----------------------------+----------------------------+-----------------------------------+-----------------------------------+-
-               | mth  |                          1 |                          5 |                                 1 |                                 5 |
+               | mth  |                          1 |                          4 |                                 1 |                                 4 |
                                                                                                                                                   (1 row)
 
                ----
                | eng  | gee   | ms     |         1 |
                | eng  | gme   | ms     |         1 |
                | la   | gengl | ma     |         1 |
-               | ns   | gmth  | bs     |         1 |
+               | ns   | gmth  | ms     |         1 |
                | ns   | pmth  | ph     |         1 |
                                             (7 rows)
 
                +----------------+
                | degree         |
               -+----------------+-
-               | bs             |
+               | ba             |
                           (1 row)
 
                ----
                +----------------+
                | degree         |
               -+----------------+-
-               | bs             |
+               | ba             |
                           (1 row)
 
                ----
                | degree     | count(^)     |
               -+------------+--------------+-
                | ba         |           10 |
-               | bs         |           11 |
+               | bs         |           10 |
                | ct         |            4 |
                | ma         |            7 |
-               | ms         |            5 |
+               | ms         |            6 |
                | pb         |            1 |
                | ph         |            1 |
                                     (7 rows)
                | degree  | count(program)  |
               -+---------+-----------------+-
                | ba      |              10 |
-               | bs      |              11 |
+               | bs      |              10 |
                | ct      |               4 |
                | ma      |               7 |
-               | ms      |               5 |
+               | ms      |               6 |
                | pb      |               1 |
                | ph      |               1 |
                                     (7 rows)
                | degree | count(^.student) |
               -+--------+------------------+-
                | ba     |              102 |
-               | bs     |              106 |
+               | bs     |               93 |
                | ct     |               37 |
                | ma     |               77 |