![]() |
Understanding aggregate functions |
2011 January 28 |
Previous Slide | Table of Contents | Next Slide |
SELECT Min(POP2001), Max(POP2001), Avg(POP2001), Sum(POP2001), Count(*) FROM com2001_s; |
SELECT COD_PRO, Min(POP2001), Max(POP2001), Avg(POP2001), Sum(POP2001), Count(*) FROM com2001_s GROUP BY COD_PRO; |
SELECT COD_REG, Min(POP2001), Max(POP2001), Avg(POP2001), Sum(POP2001), Count(*) FROM com2001_s GROUP BY COD_REG; |
SELECT DISTINCT COD_REG, COD_PRO FROM com2001_s ORDER BY COD_REG, COD_PRO; |
Previous Slide | Table of Contents | Next Slide |
![]() | Author: Alessandro Furieri a.furieri@lqt.it |
This work is licensed under the Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license. | |
![]() |
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. |