Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

PostgreSQL 9.4 FILTER CLAUSE

PostgreSQL 9.4 has introduced one of the very good FILTER CLAUSE which is used to apply filters in aggregate functions.
Using FILTER, You can use different types of aggregate functions without applying any GROUP BY CLAUSE.
Now Imagine, that I have one Student table and I want total number of Students based different grades.
What happened without FILTER CLAUSE, We have to perform this calculation in the individual SELECT query.
But with the use of FILTER CLAUSE we can perform aggregation based on different FILTER values in a single SQL Query.
Below is a small demonstration of this:
Create one Student table with sample data:
Apply FILTER clause to count number of Students based on Marks:

Comments

Popular posts from this blog

VMWARE WORKSTATION 3,4,5,6,7,8,9,10,11,12,14,15...etc LICENSE KEYS COLLECTION

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

How to Configuration UDEV SCSI Rules In Oracle Linux 5, 6 and 7

Top 10 Highest Paying URL Shortener Companies - Best URL Shorteners To Earn Fast

Linux ctime,mtime,atime,cmin,amin,mmin