SQL

Sql code posted by MSH
created at 04 May 15:12

Edit | Back
1
2
3
4
5
SELECT 
  COALESCE((SELECT SUM(bedragiv) FROM gbk_2007 WHERE (rekening LIKE '6%' AND rekening NOT LIKE '69%') AND codedc = 'D'), 0) 
                                - 
  COALESCE((SELECT SUM(bedragiv) FROM gbk_2007 WHERE (rekening LIKE '6%' AND rekening NOT LIKE '69%') AND codedc = 'C'), 0) 
AS total_costs;
312 Bytes in 2 ms with coderay