2 Matching Annotations
  1. Jan 2023
    1. SUM(PURSE), COUNT(*) AS NUM_RACES

      IMPORTANT!! : The group by clause is needed here because unlike in previous queries, we aren't simply taking a value in a prexisting table and adding it to a smaller table using the SELECT clause. We are using functions to create entirely new values. These values dont exist as part of the table, they kinda just float. Because these are floating unindexed values, the group by clause is needed to indicate how these new values should be presented in the output table for the query

    2. GROUP BY clause directs the DBMS to form groups of rows for each value of the column(s) named in the clause, returning one row in the result set for each group