In article <[EMAIL PROTECTED]>,
Ville Mattila <[EMAIL PROTECTED]> writes:
> When I try to find out the current amount of products in our stock,
> and ordered quantities I use this query:
> SELECT p.id, SUM(out.quantity) ordered_out, SUM(in.quantity)
> ordered_in FROM products p LEFT JOIN outorde
Hi there!
I have three tables:
1. Products
- id
- name
2. OutOrders (orders from customers to us)
- id
- productid
- quantity
3. InOrders (our ourders to the traders)
- id
- productid
- quantity
When I try to find out the current amount of products in our sto