Find the total savings balance of all accounts except the account with name ‘Brown’.
CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR)
SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown'
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR) Question: Find the total savings balance of all accounts except the account with name ‘Brown’. [/INST] SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown' </s>