How do I complete this SQL code in Alteryx with the formula tool without directly selecting from the table?
SELECT *, LAG(orderdate, 1, NULL) OVER (PARTITION BY fullaccountnum, cin ORDER BY orderdate) AS previous_orderdate FROM table.revenue_invoice_data