Tutorial by Examples

In order to determine some simple statistics of a value in a column of a table, you can use an aggregate function. If your individuals table is: NameAgeAllie17Amanda14Alana20 You could write this statement to get the minimum, maximum and average value: SELECT min(age), max(age), avg(age) FROM i...
You can concatenate strings separated by delimiter using the string_agg() function. If your individuals table is: NameAgeCountryAllie15USAAmanda14USAAlana20Russia You could write SELECT ... GROUP BY statement to get names from each country: SELECT string_agg(name, ', ') AS names, country FROM ...
To illustrate how to use regr_slope(Y,X), I applied it to a real world problem. In Java, if you don't clean up memory properly, the garbage can get stuck and fill up the memory. You dump statistics every hour about memory utilization of different classes and load it into a postgres database for anal...

Page 1 of 1