Q:

Postgres Values Apportionment in Same Column

I am running payroll reports, but having trouble querying and returning the results I need.  In the report, there are two columns and the table looks like this:
Date   | Costs
2014   | 100000
2015   | 150000

However, the trick is that there are two kinds of employees whose costs are added into the Costs column.  One kind of employee is "normal" and their employee numbers follow the pattern "E00..." like "E001, E002, E003, etc.
The second kind is manager.  Their employee numbers are like "E99...", so "E990, E991, etc.
For querying and returning data for the Costs column, I currently get back 100% of the employee costs for my query.  However, I would like to query and only return 50% of the E00-type employees for adding into the Cost column, and only return 12.5% of the E99-type employees for adding into the cost column.  
In this way, the Cost column will be made up from adding 50% of the Cost of E00 employees, and from adding 12.5% of the Cost of E99 employees.
The following is my query, but I can't get it to return anything:
select 
 to_char("Date", 'YYYY') as "Date",
 case
   when "Type" in ('E001', 'E002', 'E003', 'E004') then 0.5 * sum ("Amount")       filter (where "Type" in ('E001', 'E002', 'E003', 'E004'))
   when "Type" like 'E9%' then 0.125 * sum("Amount") filter (where "Type" like 'E9%')
 end as "Costs"
 from "Transactions"
 group by 1
 order by min("Date");

A:

Why not something like that?
SELECT mydate,
       SUM(mysum)
FROM (
        (SELECT to_char("Date", 'YYYY') AS mydate,
                                           0.5 * SUM("Amount") AS mysum
         FROM "Transactions"
         WHERE TYPE LIKE 'E00%'
         GROUP BY 1)
      UNION ALL
        (SELECT to_char("Date", 'YYYY') AS mydate,
                                           0.125 * SUM("Amount")
         FROM "Transactions"
         WHERE TYPE LIKE 'E9%'
         GROUP BY 1)) s1
GROUP BY mydate
ORDER BY mydate;

