Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +----+--------+-----+
- | id | userId |state|
- +----+--------+-----+
- | 1 | 1 |AZ |
- | 2 | 1 |AK |
- | 4 | 1 |AL |
- | 5 | 1 |CO |
- | 6 | 1 |CA |
- | 7 | 2 |AZ |
- | 8 | 2 |AK |
- +----+--------+-----+
- +----+---------+--------+
- | id | job | from | to |
- +----+------+------+----+
- | 1 | job1 | AZ |AK |
- | 2 | job2 | AL |CO |
- +----+---------+--------+
- +------+--------+
- | userId | job |
- +--------+------+
- | 1 | job1 | // As User 1 will have state AZ & AK
- | 1 | job2 | // As User 1 will have state AL & CO
- | 2 | job1 | // As User 2 will have state AZ & AK
- +----+----------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement