Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello there ,
With my limited knowledge on joins tried code below , but in vain .
QUERY:
LOAD * INLINE [
ID, LOC, Perks(M), Outage
A1, MICHIGAN, 2, 0.2
A1, BAY, 3, 0.5
2B, MICHIGAN, 4, 0.4
2B, DETROIT, 5, 0.01
2B, OHIO, 6, 0.9
3O, FL, 8, 0.7
];
Outer Join (QUERY)
LOAD
Distinct
LOC
Resident QUERY ;
Not getting table structure below (which is needed) :
ID | LOC | Perks(M) | Outage |
A1 | BAY | 3 | 0.5 |
A1 | MICHIGAN | 2 | 0.2 |
A1 | DETROIT | NULL | NULL |
A1 | OHIO | NULL | NULL |
A1 | FL | NULL | NULL |
2B | BAY | NULL | NULL |
2B | MICHIGAN | 4 | 0.4 |
2B | DETROIT | 5 | 0.01 |
2B | OHIO | 6 | 0.9 |
2B | FL | NULL | NULL |
3O | BAY | NULL | NULL |
3O | MICHIGAN | NULL | NULL |
3O | DETROIT | NULL | NULL |
3O | OHIO | NULL | NULL |
3O | FL | 8 | 0.7 |
Thank you fellas
try below
QUERY:
LOAD * INLINE [
ID, LOC, Perks(M), Outage
A1, MICHIGAN, 2, 0.2
A1, BAY, 3, 0.5
2B, MICHIGAN, 4, 0.4
2B, DETROIT, 5, 0.01
2B, OHIO, 6, 0.9
3O, FL, 8, 0.7
];
New:
LOAD Distinct ID
Resident QUERY;
Join(New)
LOAD Distinct LOC
Resident QUERY;
Join(QUERY)
LOAD *
Resident New;
DROP Table New;
try below
QUERY:
LOAD * INLINE [
ID, LOC, Perks(M), Outage
A1, MICHIGAN, 2, 0.2
A1, BAY, 3, 0.5
2B, MICHIGAN, 4, 0.4
2B, DETROIT, 5, 0.01
2B, OHIO, 6, 0.9
3O, FL, 8, 0.7
];
New:
LOAD Distinct ID
Resident QUERY;
Join(New)
LOAD Distinct LOC
Resident QUERY;
Join(QUERY)
LOAD *
Resident New;
DROP Table New;