EMS SQL Query for PostgreSQL 3.4.0.2

EMS...