Data modification & MERGE
Exercise · SQL & Querying

Predict, then run it

Predict the output

intake(room, item) = (west, lamp) is loaded into archive(item, room) — note the columns are declared in the opposite order. The safe load names both lists:

INSERT INTO archive (item, room) SELECT item, room FROM intake; SELECT item, room FROM archive;

Predict the exact output (the archive after the load).