-- Database schema
| state : StateCode [ TEXT ] primary_key , State [ TEXT ] , Region [ TEXT ] | callcenterlogs : Date received [ DATE ] , Complaint ID [ TEXT ] primary_key , rand client [ TEXT ] callcenterlogs.rand client = client.client_id , phonefinal [ TEXT ] , vru+line [ TEXT ] , call_id [ INTEGER ] , priority [ INTEGER ] , type [ TEXT ] , outcome [ TEXT ] , server [ TEXT ] , ser_start [ TEXT ] , ser_exit [ TEXT ] , ser_time [ TEXT ] | client : client_id [ TEXT ] primary_key , sex [ TEXT ] , day [ INTEGER ] , month [ INTEGER ] , year [ INTEGER ] , age [ INTEGER ] , social [ TEXT ] , first [ TEXT ] , middle [ TEXT ] , last [ TEXT ] , phone [ TEXT ] , email [ TEXT ] , address_1 [ TEXT ] , address_2 [ TEXT ] , city [ TEXT ] , state [ TEXT ] , zipcode [ INTEGER ] , district_id [ INTEGER ] client.district_id = district.district_id | district : district_id [ INTEGER ] primary_key , city [ TEXT ] , state_abbrev [ TEXT ] district.state_abbrev = state.StateCode , division [ TEXT ] | events : Date received [ DATE ] , Product [ TEXT ] , Sub-product [ TEXT ] , Issue [ TEXT ] , Sub-issue [ TEXT ] , Consumer complaint narrative [ TEXT ] , Tags [ TEXT ] , Consumer consent provided? [ TEXT ] , Submitted via [ TEXT ] , Date sent to company [ TEXT ] , Company response to consumer [ TEXT ] , Timely response? [ TEXT ] , Consumer disputed? [ TEXT ] , Complaint ID [ TEXT ] events.Complaint ID = callcenterlogs.Complaint ID , Client_ID [ TEXT ] events.Client_ID = client.client_id | reviews : Date [ DATE ] primary_key , Stars [ INTEGER ] , Reviews [ TEXT ] , Product [ TEXT ] , district_id [ INTEGER ] reviews.district_id = district.district_id |
-- -- Among the clients born between 1980 and 2000, list the name of male clients who complained through referral.

SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.year BETWEEN 1980 AND 2000 AND T1.sex = 'Male' AND T2.`Submitted via` = 'Referral';