In widowed male customers ages from 40 to 60, how many of them has an income ranges from 3000 and above?
widowed male customers ages from 40 to 60 refer to SEX = 'Male' where age BETWEEN 40 AND 60 and MARITAL_STATUS = 'Widowed'; income ranges from 3000 and above refers to INCOME_K BETWEEN 2000 AND 3000;
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
database name:db_id software_company
Demog table Demog Cols: GEOGRAPHIC ID dtype integer, INHABITANTS (THOUSANDS) dtype real, INCOME (THOUSANDS) dtype real, A_VAR1 dtype real, A_VAR2 dtype real, A_VAR3 dtype real, A_VAR4 dtype real, A_VAR5 dtype real, A_VAR6 dtype real, A_VAR7 dtype real, A_VAR8 dtype real, A_VAR9 dtype real, A_VAR10 dtype real, A_VAR11 dtype real, A_VAR12 dtype real, A_VAR13 dtype real, A_VAR14 dtype real, A_VAR15 dtype real, A_VAR16 dtype real, A_VAR17 dtype real, A_VAR18 dtype real, 
mailings3 table mailings3 Cols: REFERENCE ID dtype integer, REFERENCE DATE dtype datetime, RESPONSE dtype text, 
Customers table Customers Cols: ID dtype integer, SEX dtype text, MARITAL STATUS dtype text, GEOGRAPHIC ID dtype integer, EDUCATION NUMBER dtype integer, OCCUPATION dtype text, age dtype integer, 
Mailings1_2 table Mailings1_2 Cols: REFERENCE ID dtype integer, REFERENCE DATE dtype datetime, RESPONSE dtype text, 
Sales table Sales Cols: EVENT ID dtype integer, REFERENCE ID dtype integer, EVENT DATE dtype datetime, AMOUNT dtype real, 
