Hello,
I'm trying to join the two tables below, is there a way to join both tables with no common field? I want to join using Referral code and Key. All suggestions are welcome. Both tables does not have anything in common. Example would be join a value ("XYQA") in table 1 with another value in table 2("abcds")
Example below
Table 1 | |
Referral Code | Description Name |
BMWM2 | bmw m2 |
BMWM3 | bmw m3 |
BMWM4 | bmw m4 |
BMWM5 | bmw m5 |
BMWM6 | bmw m6 |
BMWM7 | bmw m7 |
BMWM8 | bmw m8 |
Table 2 | |
Key | Database Data |
abc1 | ABC1 Ja |
dba12 | Dba12 |
rocks | Rocks |
atl | Atlanta works |
nyc | New York data |
bh1212 | bh data |
pp8 | pp8 logs |
Result
Referral Code | Description Name | Key | Database Data |
BMWM2 | bmw m2 | abc1 | ABC1 Ja |
BMWM3 | bmw m3 | dba12 | Dba12 |
BMWM4 | bmw m4 | rocks | Rocks |
BMWM5 | bmw m5 | atl | Atlanta works |
BMWM6 | bmw m6 | nyc | New York data |
BMWM7 | bmw m7 | bh1212 | bh data |
BMWM8 | bmw m8 | pp8 | pp8 logs |
The calculation will differ.
User | Count |
---|---|
107 | |
85 | |
76 | |
54 | |
40 |