I am on SQL Server 2012 and have a table that looks similar to below:

Table `Trans`:

```
Amount   Itype     hPlant     PostDate
22.45     2         dplf      01/01/2016
45.55     2         dplf      01/01/2016
965.32    4         dplf      02/01/2016
14.25     3         dplf      01/01/2016
72.36     3         esch      01/01/2016
114147.77 2         dplf      01/01/2016
9641.25   4         dplf      01/01/2016
300.00    2         dplf      02/01/2016

```

I need to select the sum of amount with an `itype=2` and `date=01/01/2016` and the sum of amount with `itype=3` and `date=01/01/2016` and `plant=dplf` plus some other data from various other tables.

How do I select the sums on 2 different criteria from one table. I have something similar to this:

```
SELECT 
    SUM(tr.amount), SUM(tr2.amount),
    CONVERT(VARCHAR, tr.date, 1) + ' ' + 'TB  Upload' Reference,
    p.scode 
FROM 
    trans tr 
INNER JOIN 
    plant p on p.hmy = tr.hplant
INNER JOIN  
    trans tr2 on tr2.hplant = tr.hplant 
WHERE 
    tr.date = '01/01/2016' 
    AND tr.itype = 2 
    AND tr2.itype = 3 
    AND tr2.date = '01/01/2016'
GROUP BY  
    tr.date, p.scode

```

My results are not the same as if I ran them individually. Please help!