SELECT 
    sum(qty) as accept,
    (SELECT sum(qty) 
     FROM pile 
     WHERE pf=false) as reject 
FROM pile 
WHERE pf=true;
That's the SQL I use currently, but I'm guessing its not best practice?
The other alternative I used before was  SELECT sum(qty) FROM pile GROUP BY pf but I need them as columns and not as rows.
Are there any other solutions?