Hacker News new | ask | show | jobs
by wesd 2984 days ago
That example code seems overly complicated and redundant. Should the code be simpler like this:

  SELECT id
        , max(a) ma
         , count(*) Cnt
   FROM ...
  GROUP BY id
1 comments

The purpose of the example is to demonstrate functional dependencies based on grouped tables.