Query a database for a specific field/row values

I am working on a calculation routine that will send results back to a form. My aim is to write a java script that finds specific field/row intersection values in my database. Then, using other input from the user and the filtered values, do my calculations and send the results to the page form.

I am struggling with how to code the filtering the field/row values into variables for use in the calculations. I have searched this forum for a method but maybe I am searching for the wrong words (I often have a terminology problem that emanates from coding Fortran and Visual Basic.)

Can someone give me some guidance? Or point me to some snippets that can help?

Thanks.

https://www.wix.com/velo/reference/wix-data/query

https://www.wix.com/velo/reference/wix-dataset/dataset/getitems

https://www.wix.com/velo/reference/wix-dataset/dataset/getcurrentitem

Here you will find a lot of information → all about DATABASES and FILTERING.
You have just to read the given POSTs and EXAMPLES in this interactive-filter-tool.
https://www.media-junkie.com/pflegeservice