Answer the question
In order to leave comments, you need to log in
Many times many to many. How?
Greetings. There is an accounting system. It has many many-to-many relationships. Everything seems to be normal, but now there is a need to create some statistics. Those. cyclic records appear in the sales table - where the sales of a particular seller are displayed. That is, if you try to use this table to link a product-seller, then the product/seller will be repeated many times. How to use feng shui this table of statistics for a many-to-many relationship between a product-seller? After all, it naturally contains the fields product_id, seller_id.
Answer the question
In order to leave comments, you need to log in
select
seller_id, product_id
from table
group by seller_id
*If I understand correctly, it will display the number of sales for each of the sellers
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question