
292 PUZZLE 70 STOCK TRENDS
PUZZLE
70 STOCK TRENDS
You are not supposed to put a calculated column in a table in a pure
SQL database. And as the guardian of pure SQL, I should oppose this
practice. Well, I do oppose it, but it can be handy and you can do it
through VIEWs, so it is technically okay.
The first type is values calculated from columns in the same row. In
the days when we used punch cards, you would take a deck of cards, run
them through a machine that would do the multiplication and addition,
and then punch the results in the right-hand side of the cards. For
example, the total cost of a line in an order could be described as
(closing_price ...