INSERT INTO Orders ( userid, timestamp)
SELECT Orders.userid, Orders.timestamp FROM Users INNER JOIN Orders ON Orders.id = Users.id
SELECT
product_name,
category_name,
list_price
FROM
production.products p
INNER JOIN production.categories c
ON c.category_id = p.category_id
ORDER BY
product_name DESC;
Code language: SQL (Structured Query Language) (sql)