{"database": "cftracker", "private": false, "path": "/cftracker", "size": 706867200, "tables": [{"name": "bills", "columns": ["bill_id", "session", "legislature", "identifier", "bill", "title", "classification", "subjects", "url", "first_action_date", "latest_action_date", "latest_action", "source", "run_id", "loaded_at"], "primary_keys": ["bill_id"], "count": 1956, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "candidate_offices", "columns": ["committee", "candidate", "jurisdiction", "office", "district", "election", "status", "level", "org_id", "run_id", "loaded_at", "place"], "primary_keys": ["committee", "candidate", "jurisdiction", "office"], "count": 842, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "candidates", "columns": ["candidate_id", "name", "party", "office", "state", "district", "incumbent_challenge", "status", "election_year", "principal_committee", "source", "updated_at"], "primary_keys": ["candidate_id"], "count": 19770, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "committees", "columns": ["committee_id", "name", "committee_type", "designation", "party", "city", "state", "zip", "treasurer_name", "connected_org", "org_type", "filing_frequency", "candidate_id", "source", "updated_at"], "primary_keys": ["committee_id"], "count": 37617, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "contributions", "columns": ["sub_id", "cycle", "committee_id", "contributor_name", "city", "state", "zip", "zip5", "employer", "occupation", "entity_type", "amount", "date", "transaction_type", "memo_code", "memo_text", "image_number", "file_number", "amendment_indicator", "other_id", "source", "run_id", "loaded_at"], "primary_keys": ["sub_id"], "count": 1145280, "hidden": false, "fts_table": "contributions_fts", "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "legislators", "columns": ["person_id", "name", "given_name", "family_name", "district", "start_date", "end_date", "current", "terms", "other_names"], "primary_keys": ["person_id"], "count": 152, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "load_runs", "columns": ["run_id", "source", "params", "started_at", "finished_at", "rows_loaded", "status"], "primary_keys": ["run_id"], "count": 25, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "lobby_positions", "columns": ["legislature", "session_year", "bill", "lobbyist", "principal", "position", "is_relay", "source_url", "run_id", "loaded_at"], "primary_keys": ["legislature", "session_year", "bill", "lobbyist", "principal", "position"], "count": 108579, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "official_filings", "columns": ["filing_key", "filer", "filing_year", "reason", "office_held", "office_sought", "date_filed", "person_id", "parsed", "note", "run_id", "loaded_at", "doc_url"], "primary_keys": ["filing_key"], "count": 360, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "official_interests", "columns": ["interest_id", "filing_key", "kind", "name", "name_key", "nature", "role", "value", "description", "source", "confidence"], "primary_keys": ["interest_id"], "count": 1620, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "state_contributions", "columns": ["receipt_id", "org_id", "filer_type", "filer_name", "candidate_name", "receipt_type", "other_funds_type", "date", "amount", "description", "contributor_type", "contributor_name", "last_name", "first_name", "city", "state", "zip5", "employer", "occupation", "filed_date", "amended", "is_itemized", "file_year", "source", "run_id", "loaded_at"], "primary_keys": ["receipt_id"], "count": 134109, "hidden": false, "fts_table": "state_contributions_fts", "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "state_payments", "columns": ["fiscal_year", "agency_option", "agency", "payee", "vendor", "vendor_key", "account", "program", "total", "payments", "first_date", "last_date", "run_id", "loaded_at"], "primary_keys": [], "count": 114571, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "vendor_summary", "columns": ["vendor_key", "vendor", "paid", "payments", "first_fy", "last_fy", "agencies", "given", "gifts", "recipients", "lobbies", "principal"], "primary_keys": ["vendor_key"], "count": 45022, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "vote_records", "columns": ["vote_id", "voter_name", "person_id", "option"], "primary_keys": ["vote_id", "voter_name"], "count": 90153, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "votes", "columns": ["vote_id", "bill_id", "session", "legislature", "date", "motion", "motion_classification", "result", "yes_count", "no_count", "other_count", "url", "source", "run_id", "loaded_at"], "primary_keys": ["vote_id"], "count": 1842, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "bill_final_votes", "columns": ["bill_id", "legislature", "bill", "vote_id", "date", "motion", "result", "url"], "primary_keys": ["bill_id"], "count": 377, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "bill_sponsors", "columns": ["bill_id", "name", "entity_type", "person_id", "is_primary", "classification"], "primary_keys": [], "count": 2504, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "candidate_committees", "columns": ["candidate_id", "committee_id", "cycle", "designation", "committee_type"], "primary_keys": ["candidate_id", "committee_id", "cycle"], "count": 31601, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "conduit_committees", "columns": ["committee_id", "name"], "primary_keys": ["committee_id"], "count": 2, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "contributions_fts", "columns": ["contributor_name", "employer", "occupation", "city", "contributions_fts", "rank"], "primary_keys": [], "count": 1145280, "hidden": true, "fts_table": "contributions_fts", "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "contributions_fts_config", "columns": ["k", "v"], "primary_keys": ["k"], "count": 1, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "contributions_fts_data", "columns": ["id", "block"], "primary_keys": ["id"], "count": 9193, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "contributions_fts_docsize", "columns": ["id", "sz"], "primary_keys": ["id"], "count": 1145280, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "contributions_fts_idx", "columns": ["segid", "term", "pgno"], "primary_keys": ["segid", "term"], "count": 5046, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "legislator_committees", "columns": ["person_id", "org_id", "candidate_name", "method", "confidence"], "primary_keys": ["person_id", "org_id"], "count": 109, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "official_interest_links", "columns": ["interest_id", "principal"], "primary_keys": ["interest_id", "principal"], "count": 76, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "org_positions", "columns": ["legislature", "bill", "principal", "positions", "clear_position", "lobbyists"], "primary_keys": ["legislature", "bill", "principal"], "count": 49063, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "principal_contributions", "columns": ["principal", "receipt_id", "link_type", "method", "confidence"], "primary_keys": ["principal", "receipt_id"], "count": 10285, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "senator_org_gifts", "columns": ["principal", "person_id", "given", "contributions", "first_gift", "last_gift"], "primary_keys": ["principal", "person_id"], "count": 2225, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "sqlite_stat1", "columns": ["tbl", "idx", "stat"], "primary_keys": [], "count": 68, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "state_contributions_fts", "columns": ["contributor_name", "employer", "occupation", "city", "filer_name", "candidate_name", "state_contributions_fts", "rank"], "primary_keys": [], "count": 134109, "hidden": true, "fts_table": "state_contributions_fts", "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "state_contributions_fts_config", "columns": ["k", "v"], "primary_keys": ["k"], "count": 1, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "state_contributions_fts_data", "columns": ["id", "block"], "primary_keys": ["id"], "count": 1582, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "state_contributions_fts_docsize", "columns": ["id", "sz"], "primary_keys": ["id"], "count": 134109, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "state_contributions_fts_idx", "columns": ["segid", "term", "pgno"], "primary_keys": ["segid", "term"], "count": 1455, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "state_payment_loads", "columns": ["fiscal_year", "agency_option", "payments_reported", "payments_read", "payments_kept", "loaded_at"], "primary_keys": ["fiscal_year", "agency_option"], "count": 266, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "vendor_contributions", "columns": ["vendor_key", "receipt_id", "link_type", "confidence"], "primary_keys": ["vendor_key", "receipt_id"], "count": 8572, "hidden": true, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}], "hidden_count": 22, "views": [{"name": "contributions_detail", "private": false}], "queries": [{"title": "Where Nebraska donors' money goes", "description": "Committees that received the most itemized money from Nebraska donors. Leave cycle blank for all years, or enter one, such as 2026.", "sql": "with t as (\n  select committee_id, count(*) as contributions, sum(amount) as total\n  from contributions\n  where state = 'NE'\n    and coalesce(memo_code, '') <> 'X'\n    and committee_id not in (select committee_id from conduit_committees)\n    and (:cycle = '' or cycle = :cycle)\n  group by committee_id\n  order by total desc\n  limit 50\n)\nselect cm.name as recipient, cand.name as candidate, cand.office, cand.state as office_state,\n       t.contributions, t.total\nfrom t\nleft join committees cm on cm.committee_id = t.committee_id\nleft join candidates cand on cand.candidate_id = cm.candidate_id\norder by t.total desc", "hide_sql": true, "name": "top_recipients", "private": false}, {"title": "Top employers of Nebraska donors", "description": "Employers whose employees gave the most, as self-reported by donors. Generic answers such as retired or self-employed are left out.", "sql": "select employer, count(*) as contributions, count(distinct contributor_name) as donors, sum(amount) as total\nfrom contributions\nwhere state = 'NE'\n  and coalesce(memo_code, '') <> 'X'\n  and committee_id not in (select committee_id from conduit_committees)\n  and employer is not null\n  and upper(employer) not in ('RETIRED', 'SELF-EMPLOYED', 'SELF EMPLOYED', 'SELF', 'NONE', 'NOT EMPLOYED', 'UNEMPLOYED', 'N/A', 'NA', 'HOMEMAKER', 'INFORMATION REQUESTED', 'INFORMATION REQUESTED PER BEST EFFORTS')\n  and (:cycle = '' or cycle = :cycle)\ngroup by employer\norder by total desc\nlimit 100", "hide_sql": true, "name": "top_employers", "private": false}, {"title": "Top donors to a candidate", "description": "Type part of a candidate's last name, such as SMITH. Totals combine each donor's itemized contributions to that candidate's own committees.", "sql": "select cand.name as candidate, c.contributor_name as donor, c.city, c.employer,\n       count(*) as contributions, sum(c.amount) as total\nfrom candidates cand\njoin committees cm on cm.candidate_id = cand.candidate_id\njoin contributions c on c.committee_id = cm.committee_id\nwhere cand.name like '%' || upper(:candidate) || '%'\n  and :candidate <> ''\n  and coalesce(c.memo_code, '') <> 'X'\ngroup by cand.candidate_id, c.contributor_name, c.zip5\norder by total desc\nlimit 100", "hide_sql": true, "name": "candidate_donors", "private": false}, {"title": "Same-day giving by coworkers", "description": "Days when five or more people listing the same employer gave to the same committee. This usually reflects a fundraiser or company event. It's a pattern worth a closer look, not evidence of wrongdoing.", "sql": "select c.date, cm.name as recipient, c.employer,\n       count(distinct c.contributor_name) as donors, sum(c.amount) as total\nfrom contributions c\njoin committees cm on cm.committee_id = c.committee_id\nwhere coalesce(c.memo_code, '') <> 'X'\n  and c.committee_id not in (select committee_id from conduit_committees)\n  and c.employer is not null\n  and upper(c.employer) not in ('RETIRED', 'SELF-EMPLOYED', 'SELF EMPLOYED', 'SELF', 'NONE', 'NOT EMPLOYED', 'UNEMPLOYED', 'N/A', 'NA', 'HOMEMAKER', 'INFORMATION REQUESTED', 'INFORMATION REQUESTED PER BEST EFFORTS')\n  and (:cycle = '' or c.cycle = :cycle)\ngroup by c.date, c.committee_id, c.employer\nhaving count(distinct c.contributor_name) >= 5\norder by donors desc, total desc\nlimit 100", "hide_sql": true, "name": "same_day_coworkers", "private": false}, {"title": "Who lobbied on a bill, and what they gave", "description": "Pick a bill from the list (or type a number, such as LB3, in the address bar). Lists every organization that took a position on it, and the state campaigns that organization, its PAC or its employees gave to. Organizations are matched to contributions by name, and each row says how. A contribution isn't evidence that it influenced anyone.", "hide_sql": true, "sql": "with p as (\n  select case when instr(:bill, ':') > 0 then cast(substr(:bill, 1, instr(:bill, ':') - 1) as integer) end as leg,\n         upper(replace(substr(:bill, instr(:bill, ':') + 1), ' ', '')) as bill\n),\nleg as (\n  select coalesce((select leg from p),\n                  (select max(legislature) from org_positions where bill = (select bill from p))) as legislature\n),\norgs as (\n  select principal, positions as position from org_positions\n  where legislature = (select legislature from leg) and bill = (select bill from p)\n),\nmoney as (\n  select pc.principal, sc.candidate_name, pc.link_type,\n         count(*) as contributions, sum(sc.amount) as total, min(sc.date) as first_gift, max(sc.date) as last_gift\n  from principal_contributions pc\n  join state_contributions sc on sc.receipt_id = pc.receipt_id\n  where pc.principal in (select principal from orgs) and sc.candidate_name is not null\n  group by pc.principal, sc.candidate_name, pc.link_type\n)\nselect (select legislature from leg) as legislature, (select bill from p) as bill,\n       o.principal as organization, o.position,\n       (select round(sum(vs.paid), 2) from vendor_summary vs where vs.principal = o.principal) as paid_by_state,\n       m.candidate_name as candidate, m.link_type as given_by, m.contributions, m.total, m.first_gift, m.last_gift\nfrom orgs o\nleft join money m on m.principal = o.principal\norder by o.position, m.total desc\nlimit 1000", "name": "bill_lobbying_money", "private": false}, {"title": "An organization's lobbying positions", "description": "Type part of an organization's name, such as Farm Bureau. Lists every bill it supported, opposed or was neutral on.", "hide_sql": true, "sql": "select principal as organization, legislature, session_year, bill, position,\n       group_concat(distinct lobbyist) as lobbyists\nfrom lobby_positions\nwhere is_relay = 0 and :organization <> '' and principal like '%' || :organization || '%'\ngroup by principal, legislature, session_year, bill, position\norder by principal, legislature desc, position, (bill like 'S%'), substr(bill, instr(bill, 'L'), 2), cast(substr(bill, instr(bill, 'L') + 2) as integer), bill\nlimit 2000", "name": "organization_positions", "private": false}, {"title": "Where a lobbying organization's money went", "description": "Type part of an organization's name, such as Union Pacific. Totals what it, its PAC and people listing it as employer gave to state and local campaigns since 2022.", "hide_sql": true, "sql": "select pc.principal as organization, sc.candidate_name as candidate, sc.filer_name as committee,\n       (select co.office || case when co.district <> '' then ' ' || co.district else '' end || ', ' || coalesce(co.place, co.jurisdiction)\n          from candidate_offices co where co.org_id = sc.org_id limit 1) as office_sought,\n       (select round(sum(vs.paid), 2) from vendor_summary vs where vs.principal = pc.principal) as org_paid_by_state,\n       pc.link_type as given_by, count(*) as contributions, sum(sc.amount) as total,\n       min(sc.date) as first_gift, max(sc.date) as last_gift\nfrom principal_contributions pc\njoin state_contributions sc on sc.receipt_id = pc.receipt_id\nwhere :organization <> '' and pc.principal like '%' || :organization || '%'\ngroup by pc.principal, sc.org_id, pc.link_type\norder by total desc\nlimit 500", "name": "organization_money", "private": false}, {"title": "Top donors to a state candidate", "description": "Type part of a candidate's name, such as ARCH. Covers contributions to Nebraska state and local campaigns since 2022, with lump sums for small donors left out.", "hide_sql": true, "sql": "select c.candidate_name as candidate, c.contributor_name as donor, c.contributor_type as donor_type,\n       c.city, c.employer, count(*) as contributions, sum(c.amount) as total\nfrom state_contributions c\nwhere :candidate <> '' and c.candidate_name like '%' || upper(:candidate) || '%' and c.is_itemized = 1\ngroup by c.candidate_name, c.contributor_name, c.zip5\norder by total desc\nlimit 200", "name": "state_candidate_donors", "private": false}, {"title": "How senators voted on a bill, and money from each side", "description": "Pick a bill from the list (or type a number, such as LB3, in the address bar). For each senator: the final-reading vote, and how much organizations that supported or opposed the bill (or their PACs and employees) gave to that senator's campaigns since 2022. Organizations are matched by name. Money given isn't evidence of influence; many groups give to senators on all sides.", "hide_sql": true, "sql": "with p as (\n  select case when instr(:bill, ':') > 0 then cast(substr(:bill, 1, instr(:bill, ':') - 1) as integer) end as leg,\n         upper(replace(substr(:bill, instr(:bill, ':') + 1), ' ', '')) as bill\n),\nb as (\n  select bill_id, legislature, bill from bills\n  where bill = (select bill from p) and ((select leg from p) is null or legislature = (select leg from p))\n  order by legislature desc limit 1\n),\nfv as (select vote_id, url from bill_final_votes where bill_id = (select bill_id from b)),\norgs as (\n  select principal, clear_position from org_positions\n  where legislature = (select legislature from b) and bill = (select bill from b)\n    and clear_position is not null\n),\nmoney as (\n  select g.person_id,\n         round(sum(case when o.clear_position = 'support' then g.given end), 2) as from_supporters,\n         count(case when o.clear_position = 'support' then 1 end) as supporting_orgs,\n         round(sum(case when o.clear_position = 'oppose' then g.given end), 2) as from_opponents,\n         count(case when o.clear_position = 'oppose' then 1 end) as opposing_orgs\n  from orgs o join senator_org_gifts g on g.principal = o.principal\n  group by g.person_id\n)\nselect (select legislature from b) as legislature, (select bill from b) as bill, l.name as senator, l.district,\n       coalesce(vr.option, case when (select count(*) from fv) = 0 then 'no final vote' end) as final_vote,\n       m.from_supporters, m.supporting_orgs, m.from_opponents, m.opposing_orgs,\n       (select url from fv) as roll_call\nfrom legislators l\nleft join vote_records vr on vr.vote_id = (select vote_id from fv) and vr.person_id = l.person_id\nleft join money m on m.person_id = l.person_id\nwhere (select count(*) from b) = 1\n  and (vr.vote_id is not null or ((select count(*) from fv) = 0 and l.person_id in (\n        select vr2.person_id from votes v2 join vote_records vr2 on vr2.vote_id = v2.vote_id\n        where v2.legislature = (select legislature from b))))\norder by vr.option, coalesce(m.from_supporters, 0) + coalesce(m.from_opponents, 0) desc", "name": "bill_votes_money", "private": false}, {"title": "A senator's votes on bills lobbied by donors", "description": "Bills that reached a final vote, lobbied by organizations that gave to the senator.", "hide_sql": true, "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", "name": "senator_connections", "private": false}, {"title": "How often senators voted with their donors", "description": "For each senator: pairs of (final-reading vote, donor organization with a clear position on that bill), and the share where the vote matched the donor's position. One bill counts once per donor organization that took a side. A high share can mean donors back senators who already agree with them as easily as the reverse. It's a starting point, not a finding.", "hide_sql": true, "sql": "select l.name as senator, l.district, count(distinct g.principal) as donor_organizations,\n       sum(vr.option in ('yes', 'no')) as vote_donor_pairs,\n       sum(op.clear_position = 'support' and vr.option = 'yes' or op.clear_position = 'oppose' and vr.option = 'no') as pairs_voted_with_donor,\n       round(100.0 * sum(op.clear_position = 'support' and vr.option = 'yes' or op.clear_position = 'oppose' and vr.option = 'no')\n             / nullif(sum(vr.option in ('yes', 'no')), 0), 1) as percent_with_donor\nfrom senator_org_gifts g\njoin org_positions op on op.principal = g.principal and op.clear_position is not null\njoin bill_final_votes fv on fv.legislature = op.legislature and fv.bill = op.bill\njoin vote_records vr on vr.vote_id = fv.vote_id and vr.person_id = g.person_id\njoin legislators l on l.person_id = g.person_id\ngroup by g.person_id\norder by percent_with_donor desc", "name": "senator_alignment", "private": false}, {"title": "Bills with lobbying positions", "description": "Bills in the current Legislature that at least one registered lobbyist supported, opposed or was neutral on. Used for the bill pickers on the reports.", "hide_sql": true, "sql": "with l as (\n  select cast(coalesce(nullif(:legislature, ''), (select max(legislature) from org_positions)) as integer) as leg\n)\nselect op.bill, b.title, max(fv.bill_id is not null) as had_final_vote\nfrom (select distinct bill from org_positions where legislature = (select leg from l)) op\nleft join bills b on b.legislature = (select leg from l) and b.bill = op.bill\nleft join bill_final_votes fv on fv.bill_id = b.bill_id\ngroup by op.bill\norder by (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", "name": "bill_list", "private": false}, {"title": "Legislatures with lobbying positions", "hide_sql": true, "sql": "select legislature, min(session_year) as first_year, max(session_year) as last_year,\n       count(distinct bill) as bills\nfrom lobby_positions\nwhere is_relay = 0\ngroup by legislature\norder by legislature desc", "name": "bill_sessions", "private": false}, {"title": "Offices with candidate committees", "hide_sql": true, "sql": "select level, place as jurisdiction, office, count(*) as candidates\nfrom candidate_offices\ngroup by level, place, office\norder by case level when 'State' then 1 when 'County' then 2 when 'City' then 3 when 'School board' then 4 else 5 end, place, office", "name": "office_list", "private": false}, {"title": "Who funds a local office", "description": "Pick a place and an office, such as LINCOLN (the city) and CITY COUNCIL, or leave the office blank for every office there. Lists the donors who gave the most to anyone who ran for it. Covers itemized contributions to Nebraska state and local campaigns since 2022; candidates who raised $5,000 or less in a year don't have to file, so small races may be missing.", "hide_sql": true, "sql": "with c as (\n  select org_id, candidate, office from candidate_offices\n  where :jurisdiction <> '' and place = :jurisdiction and (:office = '' or office = :office)\n    and org_id is not null\n  group by org_id\n)\nselect sc.contributor_name as donor, sc.contributor_type as donor_type, sc.city, sc.employer,\n       count(distinct c.org_id) as candidates_funded, group_concat(distinct c.candidate) as candidates,\n       count(*) as contributions, round(sum(sc.amount), 2) as total,\n       min(sc.date) as first_gift, max(sc.date) as last_gift\nfrom c\njoin state_contributions sc on sc.org_id = c.org_id and sc.is_itemized = 1\ngroup by sc.contributor_name, sc.zip5\norder by total desc\nlimit 300", "name": "office_donors", "private": false}, {"title": "Candidates for a local office, and what they raised", "description": "Pick a place and an office, or leave the office blank for every office there. Totals are itemized contributions since 2022.", "hide_sql": true, "sql": "select co.candidate, co.office, co.district, co.committee, co.election as latest_election, co.status,\n       count(sc.receipt_id) as contributions, round(coalesce(sum(sc.amount), 0), 2) as raised,\n       count(distinct sc.contributor_name || '|' || coalesce(sc.zip5, '')) as donors,\n       min(sc.date) as first_gift, max(sc.date) as last_gift\nfrom candidate_offices co\nleft join state_contributions sc on sc.org_id = co.org_id and sc.is_itemized = 1\nwhere :jurisdiction <> '' and co.place = :jurisdiction and (:office = '' or co.office = :office)\ngroup by co.committee, co.candidate, co.office\norder by co.office, raised desc", "name": "office_candidates", "private": false}, {"title": "State vendors that give to campaigns", "description": "Companies and organizations paid by Nebraska state agencies since fiscal year 2022 whose name turns up in state campaign money. Type part of a name to narrow it, or leave it blank for the biggest. Vendors are matched to campaign money by name: contributions from a business or PAC with the vendor's name, and from people who list it as their employer. A match isn't proof of a connection, and being paid by the state isn't evidence of favoritism. Payroll and payments to individuals are left out.", "hide_sql": true, "sql": "select vendor, round(paid, 2) as paid_by_state, first_fy || '-' || last_fy as fiscal_years, agencies,\n       given as campaign_money, gifts as contributions, recipients as committees,\n       case when lobbies = 1 then 'yes' else '' end as lobbies_legislature\nfrom vendor_summary\nwhere given > 0 and (:vendor = '' or vendor like '%' || :vendor || '%')\norder by paid desc\nlimit 500", "name": "vendor_donors", "private": false}, {"title": "What the state paid a vendor", "description": "Type part of a vendor's name, such as OLSSON. Totals by fiscal year, agency and account. Fiscal years run July to June and are named for the year they end.", "hide_sql": true, "sql": "select vendor, fiscal_year, agency, account, program,\n       round(sum(total), 2) as paid, sum(payments) as payments, min(first_date) as first_payment, max(last_date) as last_payment\nfrom state_payments\nwhere :vendor <> '' and vendor like '%' || :vendor || '%'\ngroup by vendor, fiscal_year, agency, account, program\norder by fiscal_year desc, paid desc\nlimit 2000", "name": "vendor_payments", "private": false}, {"title": "A vendor's campaign money", "description": "Type part of a vendor's name. State and local campaigns that got money from the vendor, a PAC carrying its name, or people listing it as their employer, since 2022. Vendors are matched to campaign money by name: contributions from a business or PAC with the vendor's name, and from people who list it as their employer. A match isn't proof of a connection, and being paid by the state isn't evidence of favoritism. Payroll and payments to individuals are left out.", "hide_sql": true, "sql": "select vs.vendor, sc.candidate_name as candidate, sc.filer_name as committee,\n       (select co.office || case when co.district <> '' then ' ' || co.district else '' end || ', ' || coalesce(co.place, co.jurisdiction)\n          from candidate_offices co where co.org_id = sc.org_id limit 1) as office_sought,\n       vc.link_type as given_by, count(*) as contributions, round(sum(sc.amount), 2) as total,\n       min(sc.date) as first_gift, max(sc.date) as last_gift\nfrom vendor_summary vs\njoin vendor_contributions vc on vc.vendor_key = vs.vendor_key\njoin state_contributions sc on sc.receipt_id = vc.receipt_id\nwhere :vendor <> '' and vs.vendor like '%' || :vendor || '%'\ngroup by vs.vendor, sc.org_id, vc.link_type\norder by total desc\nlimit 1000", "name": "vendor_giving", "private": false}, {"title": "Find an organization", "hide_sql": true, "sql": "select name, max(lobbies) as lobbies, max(vendor) as state_vendor from (\n  select principal as name, 1 as lobbies, 0 as vendor from org_positions group by principal\n  union all\n  select coalesce(principal, vendor), lobbies, 1 from vendor_summary where principal is not null or given > 0 or paid >= 100000\n)\nwhere :q <> '' and name like '%' || :q || '%'\ngroup by name\norder by (name like :q || '%') desc, name\nlimit 60", "name": "org_search", "private": false}, {"title": "Organization summary", "hide_sql": true, "sql": "with r as (\n  select receipt_id, link_type from principal_contributions where principal = :name\n  union\n  select vc.receipt_id, vc.link_type from vendor_contributions vc\n  where vc.vendor_key in (select vendor_key from vendor_summary where principal = :name or vendor = :name)\n)\nselect :name as name,\n  (select count(*) from org_positions where principal = :name) as bill_positions,\n  (select min(legislature) from org_positions where principal = :name) as first_legislature,\n  (select max(legislature) from org_positions where principal = :name) as last_legislature,\n  (select count(distinct lobbyist) from lobby_positions where principal = :name and is_relay = 0) as lobbyists,\n  (select round(sum(sc.amount), 2) from r join state_contributions sc on sc.receipt_id = r.receipt_id) as campaign_money,\n  (select count(distinct sc.org_id) from r join state_contributions sc on sc.receipt_id = r.receipt_id) as committees,\n  (select round(sum(paid), 2) from vendor_summary where vendor_key in (select vendor_key from vendor_summary where principal = :name or vendor = :name)) as paid_by_state,\n  (select min(first_fy) from vendor_summary where vendor_key in (select vendor_key from vendor_summary where principal = :name or vendor = :name)) as first_fy,\n  (select max(last_fy) from vendor_summary where vendor_key in (select vendor_key from vendor_summary where principal = :name or vendor = :name)) as last_fy", "name": "org_summary", "private": false}, {"title": "Campaigns an organization funded", "hide_sql": true, "sql": "with r as (\n  select receipt_id, link_type from principal_contributions where principal = :name\n  union\n  select vc.receipt_id, vc.link_type from vendor_contributions vc\n  where vc.vendor_key in (select vendor_key from vendor_summary where principal = :name or vendor = :name)\n)\nselect sc.candidate_name as candidate, sc.filer_name as committee,\n       (select co.office || case when co.district <> '' then ' ' || co.district else '' end || ', ' || coalesce(co.place, co.jurisdiction)\n          from candidate_offices co where co.org_id = sc.org_id limit 1) as office_sought,\n       group_concat(distinct r.link_type) as given_by, count(*) as contributions, round(sum(sc.amount), 2) as total,\n       min(sc.date) as first_gift, max(sc.date) as last_gift\nfrom r join state_contributions sc on sc.receipt_id = r.receipt_id\ngroup by sc.org_id\norder by total desc\nlimit 300", "name": "org_recipients", "private": false}, {"title": "Bills an organization lobbied on", "hide_sql": true, "sql": "select op.legislature, op.bill, b.title, coalesce(op.clear_position, op.positions) as position,\n       fv.result as final_vote, fv.date as final_vote_date, op.lobbyists\nfrom org_positions op\nleft join bills b on b.legislature = op.legislature and b.bill = op.bill\nleft join bill_final_votes fv on fv.bill_id = b.bill_id\nwhere op.principal = :name\norder by 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)\nlimit 2000", "name": "org_bills", "private": false}, {"title": "Senators an organization gave to, and their votes on its bills", "hide_sql": true, "sql": "select l.name as senator, l.district, l.current, round(g.given, 2) as given, g.contributions,\n       g.first_gift, g.last_gift,\n       sum(vr.option in ('yes', 'no')) as votes_on_its_bills,\n       sum(op.clear_position = 'support' and vr.option = 'yes' or op.clear_position = 'oppose' and vr.option = 'no') as voted_its_way\nfrom senator_org_gifts g\njoin legislators l on l.person_id = g.person_id\nleft join org_positions op on op.principal = g.principal and op.clear_position is not null\nleft join bill_final_votes fv on fv.legislature = op.legislature and fv.bill = op.bill\nleft join vote_records vr on vr.vote_id = fv.vote_id and vr.person_id = g.person_id\nwhere g.principal = :name\ngroup by g.person_id\norder by g.given desc", "name": "org_senators", "private": false}, {"title": "What the state paid an organization", "hide_sql": true, "sql": "select fiscal_year, agency, round(sum(total), 2) as paid, sum(payments) as payments,\n       group_concat(distinct account) as accounts\nfrom state_payments\nwhere vendor_key in (select vendor_key from vendor_summary where principal = :name or vendor = :name)\ngroup by fiscal_year, agency\norder by fiscal_year desc, paid desc\nlimit 500", "name": "org_payments", "private": false}, {"title": "Lobbyists an organization hired", "hide_sql": true, "sql": "select legislature, lobbyist, count(distinct bill) as bills\nfrom lobby_positions\nwhere principal = :name and is_relay = 0\ngroup by legislature, lobbyist\norder by legislature desc, bills desc", "name": "org_lobbyists", "private": false}, {"title": "Organization name lookup", "hide_sql": true, "sql": "select coalesce((select principal from vendor_summary where vendor = :name and principal is not null limit 1), :name) as name", "name": "org_resolve", "private": false}, {"title": "Senators' financial ties to lobbying organizations", "description": "Income, business positions, stock and gifts that senators reported from organizations that lobby the Legislature, and how the senator voted on final reading of bills where that organization took a side. Type part of a senator's name, or leave it blank for all. From senators' Statements of Financial Interests (NADC Form C-1), matched to lobbying organizations by name. A tie listed on a statement is disclosed, not hidden; it shows where to look, not that anything was improper. About half of senators file this statement on paper. Those scans are read by handwriting recognition, which can misread names; ties found that way are marked \"read from a scan\". Check the scan, linked from the statement report, before relying on one.", "hide_sql": true, "sql": "with t as (\n  select f.person_id, oil.principal,\n         group_concat(distinct case i.kind when 'income' then 'income from it' when 'business' then 'officer, director, member or owner' when 'security' then 'owns its stock or bonds' when 'gift' then 'gift from it' else i.kind end) as ties,\n         group_concat(distinct nullif(trim(coalesce(i.role, '') || ' ' || coalesce(i.value, '') || ' ' || coalesce(i.description, '')), '')) as details,\n         min(f.filing_year) as first_year, max(f.filing_year) as last_year,\n         max(i.source = 'scan') as from_scan\n  from official_interest_links oil\n  join official_interests i on i.interest_id = oil.interest_id\n  join official_filings f on f.filing_key = i.filing_key\n  where f.person_id is not null\n  group by f.person_id, oil.principal\n)\nselect l.name as senator, l.district, t.principal as organization, t.ties, t.details,\n       t.first_year || case when t.last_year <> t.first_year then '-' || t.last_year else '' end as statement_years,\n       case when t.from_scan then 'read from a scan' else 'electronic filing' end as source,\n       (select sum(vr.option in ('yes', 'no')) from org_positions op\n          join bill_final_votes fv on fv.legislature = op.legislature and fv.bill = op.bill\n          join vote_records vr on vr.vote_id = fv.vote_id and vr.person_id = t.person_id\n          where op.principal = t.principal and op.clear_position is not null) as votes_on_its_bills,\n       (select sum(op.clear_position = 'support' and vr.option = 'yes' or op.clear_position = 'oppose' and vr.option = 'no')\n          from org_positions op\n          join bill_final_votes fv on fv.legislature = op.legislature and fv.bill = op.bill\n          join vote_records vr on vr.vote_id = fv.vote_id and vr.person_id = t.person_id\n          where op.principal = t.principal and op.clear_position is not null) as voted_its_way\nfrom t join legislators l on l.person_id = t.person_id\nwhere :senator = '' or l.name like '%' || :senator || '%'\norder by votes_on_its_bills desc, l.name", "name": "official_ties", "private": false}, {"title": "A senator's financial interests", "description": "Type part of a senator's or legislative candidate's name, such as Jacobson. Everything from their Statements of Financial Interests since 2022 except home address, street addresses, bank accounts and debts. Property is listed by kind and town or county only. Statements filed on paper are read from NADC's scan by handwriting recognition; those rows say \"read from scan\" with the recognizer's confidence, and link to the scan so you can check them. Handwriting is sometimes misread.", "hide_sql": true, "sql": "select f.filer, f.filing_year as covers_year,\n       case when f.parsed = 0 then 'Not read: ' || coalesce(f.note, '') else\n         case i.kind when 'income' then 'Source of income' when 'business' then 'Business position' when 'property' then 'Real property'\n                     when 'security' then 'Stock or bonds' when 'gift' then 'Gift' else i.kind end end as interest,\n       i.name, i.nature, coalesce(i.role, i.value) as role_or_value, i.description,\n       (select group_concat(oil.principal) from official_interest_links oil where oil.interest_id = i.interest_id) as lobbying_organization,\n       case when i.source = 'scan' then 'read from scan (' || cast(round(coalesce(i.confidence, 0) * 100) as integer) || '% confidence)' when f.parsed = 1 then 'electronic filing' end as source,\n       coalesce(nullif(f.office_held, ''), f.office_sought) as office, f.date_filed, f.doc_url as scanned_statement\nfrom official_filings f\nleft join official_interests i on i.filing_key = f.filing_key\nwhere :senator <> '' and f.filer like '%' || upper(:senator) || '%'\norder by f.filer, f.filing_year desc, f.date_filed desc,\n         case i.kind when 'income' then 1 when 'business' then 2 when 'property' then 3 when 'security' then 4 else 5 end, i.interest_id", "name": "official_statement", "private": false}, {"title": "Senators with financial ties to an organization", "hide_sql": true, "sql": "with t as (\n  select f.person_id, oil.principal,\n         group_concat(distinct case i.kind when 'income' then 'income from it' when 'business' then 'officer, director, member or owner' when 'security' then 'owns its stock or bonds' when 'gift' then 'gift from it' else i.kind end) as ties,\n         group_concat(distinct nullif(trim(coalesce(i.role, '') || ' ' || coalesce(i.value, '') || ' ' || coalesce(i.description, '')), '')) as details,\n         min(f.filing_year) as first_year, max(f.filing_year) as last_year,\n         max(i.source = 'scan') as from_scan\n  from official_interest_links oil\n  join official_interests i on i.interest_id = oil.interest_id\n  join official_filings f on f.filing_key = i.filing_key\n  where f.person_id is not null and oil.principal = :name\n  group by f.person_id, oil.principal\n)\nselect l.name as senator, l.district, l.current, t.ties, t.details, t.first_year, t.last_year,\n       case when t.from_scan then 'read from a scan' else 'electronic filing' end as source,\n       (select sum(vr.option in ('yes', 'no')) from org_positions op\n          join bill_final_votes fv on fv.legislature = op.legislature and fv.bill = op.bill\n          join vote_records vr on vr.vote_id = fv.vote_id and vr.person_id = t.person_id\n          where op.principal = t.principal and op.clear_position is not null) as votes_on_its_bills,\n       (select sum(op.clear_position = 'support' and vr.option = 'yes' or op.clear_position = 'oppose' and vr.option = 'no')\n          from org_positions op\n          join bill_final_votes fv on fv.legislature = op.legislature and fv.bill = op.bill\n          join vote_records vr on vr.vote_id = fv.vote_id and vr.person_id = t.person_id\n          where op.principal = t.principal and op.clear_position is not null) as voted_its_way\nfrom t join legislators l on l.person_id = t.person_id\norder by l.name", "name": "org_officials", "private": false}], "allow_execute_sql": false, "query_ms": 96.1466169974301, "source": "FEC, Nebraska Accountability and Disclosure Commission, Clerk of the Legislature, Open States", "source_url": "https://www.fec.gov/data/", "license": "Public records"}