I currently have a dataframe in R called DDS_LS
. Currently each line is by transaction but I need the transactions aggregated by the Customer_ID.
sqldf("SELECT Customer_ID, count(distinct Lifestyle), count(distinct Price_Point),
cumsum(Delivered_Sales), cumsum(QTY_sold)
FROM DDS_LS GROUP BY Customer_ID")
Then I get the following error:
Error in rsqlite_send_query(conn@ptr, statement) :
external pointer is not valid
What is causing this?