/*
I have two tables Activity and Action.
One or more actions can be performed for an activity.
And the relationships between Activity and Action is
given in a third table called Activity Action.
Here is the sql query to perform the action
*/
SELECT Activity.ActivityText as Activity,
Action.ActionText as ApplicableAction
FROM ActivityAction
INNER JOIN Activity
ON ActivityAction.ActivityId = Activity.ActivityId
INNER JOIN Action
ON ActivityAction.ActionId = Action.ActionId