Artificial Intelligence, Machine Learning, Data Science, Python, Programming.
query_str: Calculate the lifetime value (total sales) of each customer who has made a purchase within the last three years, sorted by the highest value first and display the top 5? schema: Table 'SalesOrder' has columns: SalesOrderID (INTEGER), CustomerID (INTEGER), OrderDate (DATE), RequiredDate