我有一桌人
Name Id Age Sex Country
Ankit ankitgautam24 17 M India
John john321 71 M France
Will willsmith 42 M USA
Arti artisingh 67 F Pakistan
.....3.5 million records......
和另一个表限制
Country Sex Allow
France F Allowed
France M Restricted
India F Restricted
India M Allowed
Pakistan F Restricted
....for each country ......
现在我想将其转换为表 Useraccount 其结构应该是
Name Id Age Sex Country Allow
Ankit ankitgautam24 17 M India Allowed
John john321 71 M France Restricted
Will willsmith 42 M USA Allowed
Arti artisingh 67 F Pakistan Allowed
.....hundreds of thousands of record......
以最聪明的方式将这两个表连接到一个的正确查询是什么