The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/10/static/tutorial-join.html
Description:
Thanks for the effort for this wonderful tutorial.
The last table that illustrates joining a table on itself shows that San
Fransisco has `temp_lo` lower than itself and `temp_hi` higher than itself,
without including the dates of the temperatures. I believe it would be
clearer (data-wise) if the table included the dates fields `W1.date as date`
and `W2.date as date`, making the whole example output look as follows
```
SELECT W1.city, W1.date as date, W1.temp_lo AS low, W1.temp_hi AS high
W2.city, W2.date as date, W2.temp_lo AS low, W2.temp_hi AS high
FROM weather W1, weather W2
WHERE W1.temp_lo < W2.temp_lo
AND W1.temp_hi > W2.temp_hi;
city | date | low | high | city | low | high
---------------+-----+-----+------+---------------+-----+------
San Francisco | 1994-11-29 | 43 | 57 | San Francisco | 1994-11-27 |
46 | 50
Hayward | 1994-11-29 | 37 | 54 | San Francisco | 1994-11-27 | 46
| 50
(2 rows)
```