I have a table with fname|lname|startyear|endyear
Take it that a person with same fname and lname is a unique person. There can be multiple entries with the same fname|lname.
1)How do i find all the same last names belonging to different people?
Eg 'tom' |'jerry'|1990|1991|
'vlad' |'jerry'|1991|1992|
'tim' |'cook' |1991|1992|
'tim' |'cook' |1992|1993|
Output:
jerry
2)Which people (first and last names) served between 'Mary' 'Jane's two terms?
Eg 'mary' |'jane'|1989|1990|
'tom' |'jerry'|1990|1991|
'vlad' |'jerry'|1991|1992|
'tim' |'cook' |1991|1992|
'tim' |'cook' |1992|1993|
'mary' |'jane'|1993|1994
Output
tom jerry
vlad jerry
tim cook