Aggregating your data in the query


An Oracle Guy's ColdFusion

How the data is stored rarely matches how we want it displayed. How often you need to aggregate data will normally hinge on the degree of normalization your data architect has chosen.

As with quite a few of the items I have written about or plan to write about, there are multiple ways to accomplish what is being described. Chances are that if you are a ColdFusion developer, you already perform this type of aggregation in the middle tier. That way is no less valid, especially if you are dealing with a shared query and messing with it (technical term there) might cause other developers or applications problems. If given the opportunity though, I always try to let the database do what the database does well. Deal with the data.

Oracle 11g introduced some new functionality that easily allows you to aggregate data directly in your query. The function is…

View original post 215 more words