I need to find IDs that are taking courses where the course# is under 1000 and then they are also taking course#s greater or equal to 1000. Plus, they haven't taken courses in a term prior to 1066:
Example:
ID Term Course#
1 0986 1
1 1066 2
1 1078 1000
2 1068 99
2 1088 2002
2 1108 2555
3 1108 99
4 1118 1001
ID 2 would be included because they did not take a course prior to 1066 and has a course# under 1000 and course#s greater or equal to 1000.
ID 1 would NOT be included because they took a course prior to 1066
ID 3 would NOT be included because this ID only took a course under 1000.
ID 4 would NOT be included because this ID only took a course greater or equal to 1000
Help is appreciated!
Example:
ID Term Course#
1 0986 1
1 1066 2
1 1078 1000
2 1068 99
2 1088 2002
2 1108 2555
3 1108 99
4 1118 1001
ID 2 would be included because they did not take a course prior to 1066 and has a course# under 1000 and course#s greater or equal to 1000.
ID 1 would NOT be included because they took a course prior to 1066
ID 3 would NOT be included because this ID only took a course under 1000.
ID 4 would NOT be included because this ID only took a course greater or equal to 1000
Help is appreciated!