Order By

{  
	"select": [],  
	"from": "Observation",  
	"where": {},  
	"aggregations":{  
	  "order_by": "code:code"  
	}  
}

Group By

Count By

{  
	"select": [],  
	"from": "Observation",  
	"where": {},  
	"aggregations":{  
	  "count_by": "code:code"  
	}  
}