Column name

From SQLZOO
Revision as of 12:08, 11 July 2012 by Marek (Talk | contribs) (Created page with "How can I display a column name for an aggregate function? <div class='ht'> <div> Where one of the results returned is calculated (for example with an aggregate) the column n...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How can I display a column name for an aggregate function?

Where one of the results returned is calculated (for example with an aggregate) the column name may be assigned arbitrarily.

You should be able to specify a column name.

 
SELECT region, SUM(population) AS x
  FROM cia
GROUP BY region