Two tables, one key

Join two tables
without losing rows

Paste two tables that share a column, such as a roster and a set of scores. Choose how to join them and the page shows the merged rows, counts how many keys match, which are in only one table, and warns when a repeated key would duplicate rows.

$9.99a month · everything on Caveat

Cancel anytime. How plans and refunds work

Included with Caveat Plus ($9.99 a month or $99.90 a year), Caveat Family (up to 5 people, $14.99 a month) and Caveat Teams (25 people, $199 a month). Anything you bought before stays yours.

Enter your figures and read the result

Paste both tables with header rows. The worked example is an invented roster and a list of scores.

Loading Dataset Merge and Join Assistant. If nothing appears, turn on JavaScript.

What you get

Teaching · For TeachersIncluded with Caveat Plus

What you finish with
A worked-out result for your own entry (a headline figure, tiles, tables and a drawing where one helps), as a printout, a spreadsheet (.csv) or a saved file.
Who it is for
Teachers, school staff and students who combine a roster with scores, attendance or survey data, and learners in data classes.
Format
Browser tool for a phone, tablet or computer: type or paste, the result updates as you type. Print, spreadsheet (.csv), save to a file and open it again.
Access
Included with Caveat Plus ($9.99 a month) and Caveat Teams. It opens once you are signed in, on every device. Anything you bought before stays yours.
Where it lives
The For Teachers space in Caveat Teaching.
Support
Questions about access, an order or a correction: team@caveatacademic.com.

How to use it

  1. Load the worked example to see how it reads, or start with your own entry.
  2. Type or paste into the fields; the result updates as you type.
  3. Read the headline, the tiles and the tables.
  4. Try a second case from the buttons above the fields.
  5. Print the result, download a spreadsheet or save the entry to a file.

Merge two tables

How it works

The worked example from two tables to a merged table.

Why row counts change

A join is a lookup. If the second table has two rows for one student, the student appears twice in the result. Neither table is wrong; the shape of the data simply is not one row per student. Reshape the second table first if you need one.

Check before you trust

Compare the number of left rows with the number after a left join. If it grew, a key repeats. If keys in only one table are many, the formats probably differ.

Sources

  1. Wickham, H., & Grolemund, G. (2017). R for Data Science, chapter on relational data. O'Reilly.
  2. Codd, E. F. (1970). A relational model of data for large shared data banks. Communications of the ACM, 13(6), 377-387.

The worked examples are invented for illustration. What you type is saved only in this browser and is never sent to Caveat. Support: team@caveatacademic.com.

Written with AI, then checked before it is published. How we checkFound a mistake? Report it and we fix it, or refund you.Cancel anytime.