I have this table which is used to generate second table with the result:
SELECT COUNT(*) count, SUM(amount) volume, DATE(created_at) date, DAY(created_at) day, type transaction_type status FROM payment_transactions WHERE created_at BETWEEN '2018-11-11' AND '2018-11-14'
count volume date status 1 3000 2018-11-11 approved 1 3000 2018-11-11 approved
The question is how to insert this result into second table with one query? Probably with batch insert for MariaDB?
Is there a way to archive this with one SQL query?