In MySQL Workbench I have this:
USE my_db;
SELECT
transactions.created_at, price
FROM
transactions
JOIN
transactions_items ON transactions.id = transactions_items.transaction_id
JOIN
store_items ON store_items.id = transactions_items.store_item_id;
As a result in workbench I get created_at: price. How can I create request to DB using knex syntax to get object {created_at: price}?
I was trying to use knex.raw(), but it does not seem to be working.