-- Database schema
| Demog : GEOID [ INTEGER ] primary_key , INHABITANTS_K [ REAL ] , INCOME_K [ REAL ] , A_VAR1 [ REAL ] , A_VAR2 [ REAL ] , A_VAR3 [ REAL ] , A_VAR4 [ REAL ] , A_VAR5 [ REAL ] , A_VAR6 [ REAL ] , A_VAR7 [ REAL ] , A_VAR8 [ REAL ] , A_VAR9 [ REAL ] , A_VAR10 [ REAL ] , A_VAR11 [ REAL ] , A_VAR12 [ REAL ] , A_VAR13 [ REAL ] , A_VAR14 [ REAL ] , A_VAR15 [ REAL ] , A_VAR16 [ REAL ] , A_VAR17 [ REAL ] , A_VAR18 [ REAL ] | mailings3 : REFID [ INTEGER ] primary_key , REF_DATE [ DATETIME ] , RESPONSE [ TEXT ] | Customers : ID [ INTEGER ] primary_key , SEX [ TEXT ] , MARITAL_STATUS [ TEXT ] , GEOID [ INTEGER ] , EDUCATIONNUM [ INTEGER ] , OCCUPATION [ TEXT ] , age [ INTEGER ] | Mailings1_2 : REFID [ INTEGER ] primary_key , REF_DATE [ DATETIME ] , RESPONSE [ TEXT ] | Sales : EVENTID [ INTEGER ] primary_key , REFID [ INTEGER ] , EVENT_DATE [ DATETIME ] , AMOUNT [ REAL ] |
-- -- In widowed male customers ages from 40 to 60, how many of them has an income ranges from 3000 and above?

SELECT COUNT(T1.ID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.age >= 40 AND T1.age <= 60 AND T1.MARITAL_STATUS = 'Widowed' AND T1.SEX = 'Male' AND T2.INCOME_K >= 2000 AND T2.INCOME_K <= 3000;