loanDepot Interview Question

How do you calculate weighted average in SQL?