Hi Florin,
Welcome to the Wix Code forums.
You can look at the wix-data query API for details and examples on creating database filters.
A gentle warning: What you want to do will be a bit challenging for a beginning coder. But, not impossible. Use the on-line documentation and resources to find out what and how, and we’re always here to help get you pointed in the right direction.
Good luck and have fun,
Yisrael