I have an application which has data spread accross 2 tables.There is a main table Main which has columns - Id , Name, Type.Now there is a Sub Main table that has columns - MainId(FK), StartDate,Enddate,cityand this is a 1 to many relation (each main can have multiple entries in submain).Now I want to display columns Main.Id, City( as comma seperated from various rows for that main item from submain), min of start date(from submain for that main item) and max of enddate( from sub main).I thought of having a function but that will slow things up since there will be 100k records. Is there some other way of doing this. btw the application is in asp.net. Can we have a sql query or some linq kind of thing ?