Purchase sequence number per user
Purchase sequence number per user
In table sales (id, user_id, product, amount, ts) number each purchase within every user_id in chronological order by ts, starting from 1. Return columns user_id, product, amount, ts, purchase_no. Order the result by user_id, then ts.
Row order matters
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inFocus radio
Paused · SomaFM · Fluid