cstore_test=# select product_group, count(*) from customer_reviews group by product_group;
product_group | count
---------------+---------
DVD | 121418
Video | 142235
Music | 300628
Book | 1198218
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- View pg_stat_activity with temporary files informations (file list and total file size) | |
-- version 0.3 | |
SELECT | |
pg_stat_activity.pid AS pid, | |
CASE WHEN LENGTH(pg_stat_activity.datname) > 16 | |
THEN SUBSTRING(pg_stat_activity.datname FROM 0 FOR 6)||'...'||SUBSTRING(pg_stat_activity.datname FROM '........$') | |
ELSE pg_stat_activity.datname | |
END | |
AS database, |