/frequency gives back array of dynamic length depending on whether there are db entries or not