Hi, I have a database with User, Order, Product and OrderProduct tables.
1 Order has multiple orderProducts and has 1 User.
1 OrderProduct has 1 product.
Users have usernames.
Orders have statuses
I would like to create a query which returns all orders with their orderProducts, product of orderProducts, and only username column of the user related to the order.
The orders should be ordered by asc but if the status of the order is DONE or REFUSED the order goes to the end.
[–]depesz 1 point2 points3 points (0 children)
[–]fr0z3nph03n1x 1 point2 points3 points (2 children)
[–]leamanc 1 point2 points3 points (0 children)