What are the first name and last name of the professionals who have done treatment with cost below average?
CREATE TABLE Treatments (cost_of_treatment INTEGER); CREATE TABLE Professionals (first_name VARCHAR, last_name VARCHAR); CREATE TABLE Treatments (Id VARCHAR)
SELECT DISTINCT T1.first_name, T1.last_name FROM Professionals AS T1, Treatments AS T2 WHERE cost_of_treatment < (SELECT AVG(cost_of_treatment) FROM Treatments)
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE Treatments (cost_of_treatment INTEGER); CREATE TABLE Professionals (first_name VARCHAR, last_name VARCHAR); CREATE TABLE Treatments (Id VARCHAR) Question: What are the first name and last name of the professionals who have done treatment with cost below average? [/INST] SELECT DISTINCT T1.first_name, T1.last_name FROM Professionals AS T1, Treatments AS T2 WHERE cost_of_treatment < (SELECT AVG(cost_of_treatment) FROM Treatments) </s>