I'm trying to get the difference between two dates in Pandasql (using a dataframe as table), But it doesn't work.
the code: query3 = ''' SELECT user_id , transaction_id , amount_in_eur , min(timestamp) , onboarding_completed_at , (min(timestamp)-onboarding_completed_at) FROM new_df WHERE event_kind = 'crypto_withdrawal' GROUP BY user_id HAVING amount_in_eur >= 2000 AND (min(timestamp)-onboarding_completed_at) < 4;
'''
mysql(query3)
I'm using a pandas dataframe!
How can I solve this?
Thank you.