Consider the following table structure with data –
AdjusterID | CompanyID | FirstName | LastName | EmailID
============================================================
1001 | Sterling | Jane | Stewart | janexxx@sterlin.com
1002 | Sterling | David | Boon | dav@sterlin.com
1003 | PHH | Irfan | Ahmed | irfan@phh.com
1004 | PHH | Rahul | Khanna | rahul@phh.com
============================================================
Where AdjusterID is the primary key. There are no. of adjusters for a company.
I need to have a query that will list single adjuster per company. i.e. I need to get the result as –
========================================================
1001 | Sterling | Jane | Stewart | janexxx@sterlin.com
1003 | PHH | Irfan | Ahmed | irfan@phh.com
========================================================
If any one could help me that will be great.
One way:
There are a handful of other ways involving unions and iteration, but this one is simple enough to get you started.
Edit: this assumes you want the adjuster with the lowest ID, as per your example