MySQL
- 2 ответа
- 0 вопросов
2
Вклад в тег
select
customers.Name as "Клиент",
orders.order_id as "Номер заказа",
orders.date as "Дата заказа",
Bestell_Pos.product_id as "id продукта",
Bestell_Pos.description "Описание продукта",
Products.price as "Стоимость 1 позиции",
Products.count as "Кол-во позиций",
Products.price*Products.count as "Total price"
from orders
left join customers on orders.Customer_id = customers.Customer_id
left join Bestell_Pos on orders.Order_id = Bestell_Pos.order_id
left join Products on Bestell_Pos.prod_id = Products.Product_id
group by orders.order_id, Products.Product_id