The repetition of results

I am encountering issues with the repetition of results in this code (in the terminal) I saw each result 4 times. May the problem i used the same sorted_dic i am not sure.
I wrote

for q in 1:4 # number of school
standard = {Float64}()
for i in students_4schools
push!(standard, S[i] * W/ (f[i])

     dict_standard = Dict(students_4schools[q] .=> standard)

    sorted_dict = Dict(sort(collect(dict_standard), by=x -> x[2], rev=true))


Please provide a working example with runnable code (just create some dummy data for students_4schools.

Also check that your code is working - standard = {Float64}() has not been valid syntax for a long time.

Also note that a Dict is a unordered collection, so sorting the entries does not work! If you need an OrderedDict you can use the implementation in OrderedCollections.jl.

thank you for your reply.
itried to write just allSchools=collect(keys(sorted_dict))[1:30] then it solved .

thank you for your reply