Created
September 3, 2018 20:36
-
-
Save artemrogov/2e9846cc450b6e89d6d0437f6ecaf274 to your computer and use it in GitHub Desktop.
stores orders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select orders.id as 'номер заказа', | |
orders.total as `сумма всего заказа`, | |
s.name as 'магазин покупки', | |
c.user_name as 'имя покупателя', | |
p.name as 'товар', | |
o.qt as 'кол-во' | |
from orders | |
join orders_details o on orders.id = o.order_id | |
join stores s on s.id = o.store_id | |
join customers c on c.id = orders.user_id | |
join products p on p.id = o.product_id | |
where o.store_id = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment