Hello!
I’m doing the exercise for ‘creation copy of a table’ but I could not insert the data because I used
create table invoice_archive2 as
SELECT *
FROM clients c
JOIN invoices inv
ON c.client_id = inv.client_id
WHERE payment_date IS NOT NULL
instead of
create table invoice_archive2 as
SELECT *
FROM clients c
JOIN invoices inv
USING (client_id)
WHERE payment_date IS NOT NULL
I was under the assumption that USING (client_id) is a shorthand for what I did, so why did it not work? Can someone assist in clarification? I’d very much appreciate it.