Hi Lars,
Thanks for the explanation, I will try it out. Also is it possible to do same by using graphical modelling? as in graphical modelling we have aggregation note? Thing is, this is just the small part of my complete scenario that I have done in graphical modelling and being new in this field I am not sure can I combine SQL and graphical mapping. Kindly suggest.