I have a database with the tables estabelecimentos
and produtos
. Register the products relating to the establishments.
I need to make an appointment where I only select one product from each establishment, I thought about doing it with LIMIT but it does not seem to work.
Example: if I have 10 establishments and 100 products, I want a query that returns 10 products but one of each establishment.