I need to fetch a list of Participants for an event. An event can be tagged for some countries and regions.
A Participant can register with their interest area (Countries and regions). Interest Area(s) are being used as an option for the participant to filter the events they need.
Interest Area filter can be applied for both countries and region as well as either one of them. Participant can also select this option as :
Countries 'AND' Region >> Both filters need to be matched
Countries 'OR' Region >> either filters need to be matched
As Soon as an event releases, All MATCHED PARTICIPANTS will be notified about the event.
USED TABLES and their O/P-
Select * from CountryMaster ID CountryName 1 China 2 Russia Select * from RegionMaster regionID Region 1 North 2 South Select * from EventMaster ID Name 1 Event 1 2 Event 2 Select * from EventCountry RecID EventID CountryID 1 1 1 2 1 2 Select * from EventRegion RecID EventID regionID 1 1 1 2 1 2 Select * from ParticipantMaster ID Name SelectionCriteria 1 Louis AND 2 Frank OR Select * from ParticipantCountry RecID ParticipantID CountryID 1 1 1 2 1 2 Select * from ParticipantRegion RecID ParticipantID regionID 1 1 1 2 1 2
Please guide me to accomplish this.