0
I need an SQL code that shows me the best sellers but in the result show me which store this employee belongs to.
I can do the research to find out which are the best sellers but I don’t know how to select which store it is from. Below is my code:
select distinct co_operador, count(*) as qtidade_lib
from [dbo].[pistb002_liberacao_beneficio]
group by co_operador
order by "qtidade_lib" desc
And where is the store recorded? Another table? In the same?
– Bacco