in the case that I want to run the analysis of a group of variables by quintiles and considering also a dummy (let's say gender), how could I write this command?

i define a local
local quint_sum num_employees time_psp furthest_loc_time

quintiles variable:prof_quint
dummy variable: gender

loop I am trying to use:

foreach x of numlist 1/5 {
foreach y of local operation_dec {
foreach k of varlist gender {
tab `y' if prof_quint==`x' & gender==`k'
}
}
}