Database Systems (Spring 2011) - Important News
-
29/03/2011, Finding a group partner
A list of all the "ungrouped" students..
-
09/03/2011, A note on aggregation
PLEASE read the following note as it required for your first hw..
Note that when using an aggregation function (e.g. max, min..) you cannot select "more" fields unless they are "grouped by". If you do select such fields, then the result is undefined: In Oracle, the query does not compile, while in MySQL the result is the undefined. For example consider the following table:
id num 2 10 3 11 4 12 For the query
SELECT max(num) FROM table
the result is12 However, when adding a field (not in the "group by", as in this example), the result is undefined:
SELECT id, max(num) FROM table
the result is (in MySQL)
Note that to receive the correspond id, you would need to create another query (nesting). Also note that sometimes you might get the "true" answer (in this example, if you change the "max" to "min") by chance. The query is nevertheless wrong (i.e. you wont get the points in your hw)..2 12 -
13/02/2011
Welcome to the course :)