Which first names are used for professionals or owners but are not used as dog names?
CREATE TABLE Owners (first_name VARCHAR, name VARCHAR); CREATE TABLE Dogs (first_name VARCHAR, name VARCHAR); CREATE TABLE Professionals (first_name VARCHAR, name VARCHAR)
SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE Owners (first_name VARCHAR, name VARCHAR); CREATE TABLE Dogs (first_name VARCHAR, name VARCHAR); CREATE TABLE Professionals (first_name VARCHAR, name VARCHAR) Question: Which first names are used for professionals or owners but are not used as dog names? [/INST] SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs </s>