المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Sql script



C# Programming
05-04-2009, 01:51 PM
Hi All,

I have tables called CALL and Operator.

Select Distinct(Mobile),MIN(DATE_OF_CALL),NAME_OPERATOR from Call inner Join Operator on
Call.CustomerId=Operator.CustomerID
where Datename(month,DATE_OF_CALL)='APRIL'
Group by Mobile

What i want is to get the first date of entry for each Mobiles in the month of april and the operator who attended them.

However i Have to group by Name_operator to run the above script.But i dont want them to be grouped by OPerator.I want the first entry of a mobile in the database together with the name of the operator who attended them.

How do i go about it Please?


Thank you so much.