db.accounting.aggregate([					
	{$match:{'institute':'상도','date':{$lt:'2016-02-09'}}},				
	{$group:				
		{'_id':{'institute':'$institute'},'income':{$sum:'$income'},'outcome':{$sum:'$outcome'}}			
	}
])
db.accounting.aggregate([					
	{ "$match" : { "institute" : "상도"}},
	{ "$project" : { }},
	{ "$group" : { 
			"_id" : { "institute" : "$institute"} , 
			"income" : { "$sum" : "$income"} , 
			"outcome" : { "$sum" : "$outcome"}
		}
	},
	{ "$sort" : { }},
	{ "$limit" : 100000},
	{ "$skip" : 0},
	{ "$unwind" : { }}
])
db.getCollection('accounting').insert({
	'seqno':NumberInt(1),
	'institute' : '상도',
	'date' :'2015-08-19',
	'update_date' : '2015-02-01',
	'account' :'비품',
	'detail':'프로젝터',
	'customer' : 'g9',
	'code' : 'card',
	'plan' : '',
	'income' : NumberInt(0),
	'outcome' : NumberInt(79900),
	'document' : '',
	'secretary' : 'pharosadmin',
	'remarks' : 'jks card'
})