Hello!
I am very much a novice with SQL, I have currently been working with SQL Server(2008) for about 5 months now. Before December of last year I didn't even know what SELECT was, so I still have much to learn!
I had a question specifically relating to summarizing one specific field for my result set from a SELECT statement. It's a very basic query where I'm joining on a few tables and have some conditions applied in the WHERE clause. Now, one of these tables is an, "Activity" table. So this table shows a timestamp for when each record was modified. Basically I want to show only the most recent date modified, not every date modified for my primary ID.
I've tried a few things but I'm stumped. I've tried learning ROLLUP and CUBE but I'm not sure if it's applicable here, I was playing around with it but I don't quite understand it. It seems as if none of my fields with ROLLUP were being summarized at all, there were still duplicates for the specified field, so I know I'm not understanding it correctly.
So to clarify for this specific inquiry, I want only want one record returned from the "Activity" table for where it's joined on my other tables(so one record per column in the relevant table). Thank you so much for your time, maybe in due time I'll become as proficient as you folks!