I have a schema that has two relations. One is loan which has the attributes loan-number, branch-name and amount. The other is borrower which has customer-name and loan-number as its attributes. These two relations are linked via loan-number.
How would I write a query in relational algebra to find the names of customers with a balance less than 10000?
How would I do this as a SQL query?