forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2e42296
committed
Doc: improve tutorial section about grouped aggregates.
Commitfede154 introduced FILTER by jamming it into the existingexample introducing HAVING, which seems pedagogically poor to me;and it added no information about what the keyword actually does.Not to mention that the claimed output didn't match the sampledata being used in this running example.Revert that and instead make an independent example using FILTER.To help drive home the point that it's a per-aggregate filter,we need to use two aggregates not just one; for consistencyexpand all the examples in this segment to do that.Also adjust the example using WHERE ... LIKE so that it'd producenonempty output with this sample data, and show that output.Back-patch, as the previous patch was. (Sadly, v10 is now outof scope.)Discussion:https://postgr.es/m/166794307526.652.9073408178177444190@wrigleys.postgresql.org1 parent6dde6ed commit2e42296
1 file changed
+49
-16
lines changedLines changed: 49 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
706 | 706 |
| |
707 | 707 |
| |
708 | 708 |
| |
709 |
| - | |
710 |
| - | |
| 709 | + | |
| 710 | + | |
711 | 711 |
| |
712 | 712 |
| |
713 |
| - | |
| 713 | + | |
714 | 714 |
| |
715 | 715 |
| |
716 | 716 |
| |
717 | 717 |
| |
718 | 718 |
| |
719 |
| - | |
720 |
| - | |
721 |
| - | |
722 |
| - | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
723 | 723 |
| |
724 | 724 |
| |
725 | 725 |
| |
726 | 726 |
| |
727 | 727 |
| |
728 | 728 |
| |
729 |
| - | |
730 |
| - | |
| 729 | + | |
731 | 730 |
| |
732 | 731 |
| |
733 |
| - | |
| 732 | + | |
734 | 733 |
| |
735 | 734 |
| |
736 | 735 |
| |
737 | 736 |
| |
738 | 737 |
| |
739 | 738 |
| |
740 |
| - | |
741 |
| - | |
742 |
| - | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
743 | 742 |
| |
744 | 743 |
| |
745 | 744 |
| |
| |||
749 | 748 |
| |
750 | 749 |
| |
751 | 750 |
| |
752 |
| - | |
| 751 | + | |
753 | 752 |
| |
754 | 753 |
| |
755 |
| - | |
756 |
| - | |
| 754 | + | |
757 | 755 |
| |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
758 | 763 |
| |
759 | 764 |
| |
760 | 765 |
| |
| |||
791 | 796 |
| |
792 | 797 |
| |
793 | 798 |
| |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
794 | 827 |
| |
795 | 828 |
| |
796 | 829 |
| |
|
0 commit comments
Comments
(0)