SQL (was: Why using "Group By")
Date: Thu, 13 Mar 2003 14:07:52 -0800
"Bob Badour" <bbadour_at_golden.net> wrote in message
> From what I have seen from them over the years, I expect them to screw
> things up royally. They haven't disappointed me yet.
Name a better languge.
In SQL there is a "select" clause, it corresponds to projection operation, a "where" clause which combines all the predicates for restriction operation, and "from" clause where Cartesian Product of all the tables/views resides. A subquery can be plugged in into any of those parts. When we inline a subquery into the "from" clause, we leverage relational closure. Subquery into the "select" clause, as we saw, is a nice way to express aggregation. Chris Date considers scalar subqueries disgusting, but are they really? Does it mean that D4 won't allow subqueries in the select clause? Finally, a subquery in the "where" clause allows us to express logical quantifiers. This is as much SQL as I'm able to digest so far, but I wasn't disappointed. Received on Thu Mar 13 2003 - 23:07:52 CET