JoinAcross[{a1,a2,…},{b1,b2,…},keyspec]
gives a list of associations obtained by joining those pairs of associations ai and bj in which the values specified by keyspec match.
JoinAcross[tab1,tab2,keyspec]
joins two tabular objects according to keyspec.
JoinAcross[prefix1obj1,prefix2obj2,keyspec]
prefixes the keys in obji with prefixi using ExtendedKey[prefixi,ckeyij].
JoinAcross[alist,blist,keyspec,"joinspec"]
uses joinspec to determine when to allow associations that contain missing elements to be generated.


JoinAcross
JoinAcross[{a1,a2,…},{b1,b2,…},keyspec]
gives a list of associations obtained by joining those pairs of associations ai and bj in which the values specified by keyspec match.
JoinAcross[tab1,tab2,keyspec]
joins two tabular objects according to keyspec.
JoinAcross[prefix1obj1,prefix2obj2,keyspec]
prefixes the keys in obji with prefixi using ExtendedKey[prefixi,ckeyij].
JoinAcross[alist,blist,keyspec,"joinspec"]
uses joinspec to determine when to allow associations that contain missing elements to be generated.
Details and Options


- JoinAcross[{a1,a2,…},{b1,b2,…},keyspec] effectively implements the analog of SQL JOIN, joining two tables with rows ai and bj across columns specified by keyspec.
- In JoinAcross[{a1,a2,…},{b1,b2,…},keyspec], keyspec can be one of the following:
-
key join ai and bj, when the value associated with key is the same {key1,key2,…} all the values associated with each keyi need to be the same in each matched pair keyakeyb the value associated with keya in ai must be the same as the value associated with keyb in bj {keya1keyb1,keya2keyb2,…} match the value associated with keyai in ai with the value associated with keybj in bj func join the pairs ai, bj whenever func[ai,bj] is True - In JoinAcross[{a1,a2,…},{b1,b2,…},keyspec], keyspec can effectively be replaced by the following functions:
-
key #1[key]===#2[key]& {key1,key2,…} #1[key1]===#2[key1]&[key2]===#2[key2]&&…& keyakeyb #1[keya]===#2[key2]& {keya1keyb1,keya2keyb2,…} #1[keya1]===#2[keyb1]&[keya2]===#2[keyb2]&&…& - Key specifications in JoinAcross must be wrapped in Key unless they are strings.
- JoinAcross effectively generates a filtered version of Flatten[Outer[Join,alist,blist]].
- By default, JoinAcross does an "inner join" in the SQL sense.
- The following forms for "joinspec" specify different behavior for pairs of associations ai, bj:
-
"Inner" keep only those ai, bj for which values match (default) "Left" allow ai for which there is no matching bj "Right" allow bi for which there is no matching aj "Outer" allow both unmatched ai and bj - When a corresponding value is absent, Missing["Unmatched"] is used in its place.
- JoinAcross[{a1,…},{b1,…},{},"joinspec"] and JoinAcross[{a1,…},{b1,…},True&,"joinspec"] are effectively the same as Outer[Join,{a1,…},{b1,…}]. Since all ai match all bj, the "joinspec" is ignored.
- The option KeyCollisionFunction can be given to specify what to do with elements of ai and bj that are not specified to be joined, but nevertheless have the same key.
- Possible settings for KeyCollisionFunction include:
-
None drop both elements Left include only the left element (default) Right include only the right element func apply func to generate a pair of new keys
Examples
open all close allBasic Examples (10)
Join two associations that have the same value for the specified key:
Do the same using Tabular objects:
Join by different keys on the left and on the right:
Use a function to find posthumous works:
Use rules to avoid key collisions:
With "Inner" join (default), combine only the matched associations:
With "Left" join, include unmatched entries from the left list:
With "Right" join, unmatched entries from the right list are included:
Scope (2)
Options (3)
InterpretationBox[$Line = 0; Null] (3)
When a matching key b is not used for joining, pick the left value for this key by default:
Use KeyCollisionFunction to specify which value of the colliding key should be returned:
Applications (1)
Properties & Relations (2)
In some cases, JoinAcross can be rewritten as ColumnwiseCombine:
JoinAcross is equivalent to CombinedEntityClass:
Text
Wolfram Research (2014), JoinAcross, Wolfram Language function, https://reference.wolfram.com/language/ref/JoinAcross.html (updated 2015).
CMS
Wolfram Language. 2014. "JoinAcross." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/JoinAcross.html.
APA
Wolfram Language. (2014). JoinAcross. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/JoinAcross.html
BibTeX
@misc{reference.wolfram_2025_joinacross, author="Wolfram Research", title="{JoinAcross}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/JoinAcross.html}", note=[Accessed: 13-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_joinacross, organization={Wolfram Research}, title={JoinAcross}, year={2015}, url={https://reference.wolfram.com/language/ref/JoinAcross.html}, note=[Accessed: 13-August-2025]}