{"ok": true, "database": "cftracker", "query_name": "senator_connections", "rows": [], "truncated": false, "columns": ["senator", "legislature", "bill", "title", "organization", "organization_position", "organization_gave_senator", "senator_final_vote", "alignment", "bill_page"], "query": {"sql": "select l.name as senator, op.legislature, op.bill, b.title, op.principal as organization,\n       op.clear_position as organization_position, round(g.given, 2) as organization_gave_senator,\n       vr.option as senator_final_vote,\n       case\n         when vr.option is null then null\n         when op.clear_position = 'support' and vr.option = 'yes' or op.clear_position = 'oppose' and vr.option = 'no' then 'voted with organization'\n         when op.clear_position = 'support' and vr.option = 'no' or op.clear_position = 'oppose' and vr.option = 'yes' then 'voted against organization'\n         else ''\n       end as alignment,\n       b.url as bill_page\nfrom legislators l\njoin senator_org_gifts g on g.person_id = l.person_id\njoin org_positions op on op.principal = g.principal and op.clear_position is not null\njoin bills b on b.legislature = op.legislature and b.bill = op.bill\njoin bill_final_votes fv on fv.bill_id = b.bill_id\nleft join vote_records vr on vr.vote_id = fv.vote_id and vr.person_id = l.person_id\nwhere :senator <> '' and l.name like '%' || :senator || '%'\norder by g.given desc, op.legislature desc, (op.bill like 'S%'), substr(op.bill, instr(op.bill, 'L'), 2), cast(substr(op.bill, instr(op.bill, 'L') + 2) as integer), op.bill\nlimit 3000", "params": {"senator": ""}}, "error": null, "private": false, "allow_execute_sql": false, "query_ms": 0.944369996432215, "source": "FEC, Nebraska Accountability and Disclosure Commission, Clerk of the Legislature, Open States", "source_url": "https://www.fec.gov/data/", "license": "Public records"}