Guest Orders Hide New Users
Marketing is looking for users who have never ordered. orders.user_id contains empty values for guest orders, and the old check breaks the list because of them. Fix it and return the id values for users without orders, sorted by id.
Buggy query
SELECT u.id FROM users u WHERE u.id NOT IN (SELECT user_id FROM orders) ORDER BY u.id;
Sampla aschuir a bhfuiltear ag súil leis
Seo é an chuma a bheadh ar fhreagra ceart — tá a líon rónna féin aige, ní gá dó na táblaí scéime a mheaitseáil.
| id |
|---|
| 5 |
Logáil isteach chun stair na n-aighneachtaí a fheiceáil
Logáil isteachLogáil isteach chun an Meantóir IS a úsáid
Logáil isteach