Say I have a select
SELECT DISTINCT id, customer_id, domain FROM config WHERE type = \'foo\';
which returns some records.
How can I do
INSERT INTO config (id, customer_id, domain) SELECT id, customer_id, 'www.example.com' FROM ( SELECT DISTINCT id, customer_id, domain FROM config WHERE type = 'foo' ) x;