.headers on
.mode csv
.output legislators.csv
select name, given_name, family_name, gender, party, jurisdiction, r.district, r.type from person join personrole r on r.person_id=person.id where r.end_date is null;
