Print all women (customer_pk) and their max income. You need to withdraw those who have a maximum income for all time at least three times more than the minimum for all time. Table table1 looks like this (customer_pk, firstnm, middlenm, lastnm, income) Was the query written correctly?
SELECT customer_pk,maximum FROM ( select customer_pk, min(income) as minimum, max(income) as maximum from table1 where middlenm like '%НА' group by customer_pk )as t WHERE t.maximum >= 3*t. minimum
middlenm like '%НА'will deduce exactly women - Mike