Bug #753 Documentation: Tutorial section 3.3.4.9 Using More Than one Table
Submitted: 30 Jun 2003 1:26 Modified: 14 Jul 2003 9:33
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:4.0.13 OS:Windows (Windows)
Assigned to: Paul DuBois CPU Architecture:Any

[30 Jun 2003 1:26] [ name withheld ]
Description:
Just a typo:

mysql> SELECT pet.name,
    -> (TO_DAYS(date) - TO_DAYS(birth))/365 AS age,
    -> remark
    -> FROM pet, event
    -> WHERE pet.name = event.name AND type = "litter";
+--------+------+-----------------------------+
| name   | age  | remark                      |
+--------+------+-----------------------------+
| Fluffy | 2.27 | 4 kittens, 3 female, 1 male |
| Buffy  | 4.12 | 5 puppies, 2 female, 3 male |
| Buffy  | 5.10 | 3 puppies, 3 female         |
+--------+------+-----------------------------+

How to repeat:
Just documentation.

Suggested fix:
'TO_DAYS(date)' should be 'TO_DAYS(event_date)'.
[14 Jul 2003 9:33] Paul DuBois
The query is correct as written.