target-benchmark/spider-queries huggingface dataset:
Database: dog_kennels (tables: owners, professionals)
Question: Find the states where both owners and professionals live.
SQL: SELECT state FROM Owners INTERSECT SELECT state FROM Professionals
Database: dog_kennels (tables: dogs, treatments)
Question: What is the average age of the dogs who have gone through any treatments?
SQL: SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )
Database: dog_kennels (tables: dogs, treatments)
Question: Find the average age of the dogs who went through treatments.
SQL: SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )
Database: dog_kennels (tables: professionals, treatments)
Question: Which professionals live in the state of Indiana or have done treatment on more than 2 treatments? List his or her id, last name and cell phone.
SQL: SELECT professional_id ,  last_name ,  cell_number FROM Professionals WHERE state  =  'Indiana' UNION SELECT T1.professional_id ,  T1.last_name ,  T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id  =  T2.professional_id GROUP BY T1.professional_id HAVING count(*)  >  2
Database: dog_kennels (tables: professionals, treatments)
Question: Find the id, last name and cell phone of the professionals who live in the state of Indiana or have performed more than two treatments.
SQL: SELECT professional_id ,  last_name ,  cell_number FROM Professionals WHERE state  =  'Indiana' UNION SELECT T1.professional_id ,  T1.last_name ,  T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id  =  T2.professional_id GROUP BY T1.professional_id HAVING count(*)  >  2
Database: dog_kennels (tables: treatments, dogs)
Question: Which dogs have not cost their owner more than 1000 for treatment ? List the dog names .
SQL: select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum(cost_of_treatment)  >  1000 )
Database: dog_kennels (tables: treatments, dogs)
Question: What are the names of the dogs for which the owner has not spend more than 1000 for treatment ?
SQL: select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum(cost_of_treatment)  >  1000 )
Database: dog_kennels (tables: owners, dogs, professionals)
Question: Which first names are used for professionals or owners but are not used as dog names?
SQL: SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs
Database: dog_kennels (tables: owners, dogs, professionals)
Question: Find the first names that are used for professionals or owners but are not used as dog names.
SQL: SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs
Database: dog_kennels (tables: professionals, treatments)
Question: Which professional did not operate any treatment on dogs? List the professional's id, role and email.
SQL: SELECT professional_id ,  role_code ,  email_address FROM Professionals EXCEPT SELECT T1.professional_id ,  T1.role_code ,  T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id  =  T2.professional_id
Database: dog_kennels (tables: professionals, treatments)
Question: Give me the id, role and email of the professionals who did not perform any treatment on dogs.
SQL: SELECT professional_id ,  role_code ,  email_address FROM Professionals EXCEPT SELECT T1.professional_id ,  T1.role_code ,  T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id  =  T2.professional_id
Database: dog_kennels (tables: owners, dogs)
Question: Which owner owns the most dogs? List the owner id, first name and last name.
SQL: SELECT T1.owner_id ,  T2.first_name ,  T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id  =  T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1
Database: dog_kennels (tables: owners, dogs)
Question: Return the owner id, first name and last name of the owner who has the most dogs.
SQL: SELECT T1.owner_id ,  T2.first_name ,  T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id  =  T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1
Database: dog_kennels (tables: professionals, treatments)
Question: Which professionals have done at least two treatments? List the professional's id, role, and first name.
SQL: SELECT T1.professional_id ,  T1.role_code ,  T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id  =  T2.professional_id GROUP BY T1.professional_id HAVING count(*)  >=  2
Database: dog_kennels (tables: professionals, treatments)
Question: What are the id, role, and first name of the professionals who have performed two or more treatments?
SQL: SELECT T1.professional_id ,  T1.role_code ,  T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id  =  T2.professional_id GROUP BY T1.professional_id HAVING count(*)  >=  2
Database: dog_kennels (tables: dogs, breeds)
Question: What is the name of the breed with the most dogs?
SQL: SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code  =  T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1
Database: dog_kennels (tables: dogs, breeds)
Question: Which breed do the most dogs have? Give me the breed name.
SQL: SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code  =  T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1
Database: dog_kennels (tables: owners, dogs, treatments)
Question: Which owner has paid for the most treatments on his or her dogs? List the owner id and last name.
SQL: SELECT T1.owner_id ,  T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id  =  T2.owner_id JOIN Treatments AS T3 ON T2.dog_id  =  T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1
Database: dog_kennels (tables: owners, dogs, treatments)
Question: Tell me the owner id and last name of the owner who spent the most on treatments of his or her dogs.
SQL: SELECT T1.owner_id ,  T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id  =  T2.owner_id JOIN Treatments AS T3 ON T2.dog_id  =  T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1
Database: dog_kennels (tables: treatment_types, treatments)
Question: What is the description of the treatment type that costs the least money in total?
SQL: SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code  =  T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1
Database: dog_kennels (tables: treatment_types, treatments)
Question: Give me the description of the treatment type whose total cost is the lowest.
SQL: SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code  =  T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1
Database: dog_kennels (tables: owners, dogs, treatments)
Question: Which owner has paid the largest amount of money in total for their dogs? Show the owner id and zip code.
SQL: SELECT T1.owner_id ,  T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id  =  T2.owner_id JOIN Treatments AS T3 ON T2.dog_id  =  T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1
Database: dog_kennels (tables: owners, dogs, treatments)
Question: Find the owner id and zip code of the owner who spent the most money in total for his or her dogs.
SQL: SELECT T1.owner_id ,  T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id  =  T2.owner_id JOIN Treatments AS T3 ON T2.dog_id  =  T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1
Database: dog_kennels (tables: professionals, treatments)
Question: Which professionals have done at least two types of treatments? List the professional id and cell phone.
SQL: SELECT T1.professional_id ,  T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id  =  T2.professional_id GROUP BY T1.professional_id HAVING count(*)  >=  2
Database: dog_kennels (tables: professionals, treatments)
Question: Find the id and cell phone of the professionals who operate two or more types of treatments.
SQL: SELECT T1.professional_id ,  T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id  =  T2.professional_id GROUP BY T1.professional_id HAVING count(*)  >=  2
Database: dog_kennels (tables: professionals, treatments)
Question: What are the first name and last name of the professionals who have done treatment with cost below average?
SQL: SELECT DISTINCT T1.first_name ,  T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment  <  ( SELECT avg(cost_of_treatment) FROM Treatments )
Database: dog_kennels (tables: professionals, treatments)
Question: Which professionals have operated a treatment that costs less than the average? Give me theor first names and last names.
SQL: SELECT DISTINCT T1.first_name ,  T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment  <  ( SELECT avg(cost_of_treatment) FROM Treatments )
Database: dog_kennels (tables: professionals, treatments)
Question: List the date of each treatment, together with the first name of the professional who operated it.
SQL: SELECT T1.date_of_treatment ,  T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id  =  T2.professional_id
Database: dog_kennels (tables: professionals, treatments)
Question: What are the date and the operating professional's first name of each treatment?
SQL: SELECT T1.date_of_treatment ,  T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id  =  T2.professional_id
Database: dog_kennels (tables: treatments, treatment_types)
Question: List the cost of each treatment and the corresponding treatment type description.
SQL: SELECT T1.cost_of_treatment ,  T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code  =  T2.treatment_type_code
Database: dog_kennels (tables: treatments, treatment_types)
Question: What are the cost and treatment type description of each treatment?
SQL: SELECT T1.cost_of_treatment ,  T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code  =  T2.treatment_type_code
Database: dog_kennels (tables: owners, dogs)
Question: List each owner's first name, last name, and the size of his for her dog.
SQL: SELECT T1.first_name ,  T1.last_name ,  T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id  =  T2.owner_id
Database: dog_kennels (tables: owners, dogs)
Question: What are each owner's first name, last name, and the size of their dog?
SQL: SELECT T1.first_name ,  T1.last_name ,  T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id  =  T2.owner_id
Database: dog_kennels (tables: owners, dogs)
Question: List pairs of the owner's first name and the dogs's name.
SQL: SELECT T1.first_name ,  T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id  =  T2.owner_id
Database: dog_kennels (tables: owners, dogs)
Question: What are each owner's first name and their dogs's name?
SQL: SELECT T1.first_name ,  T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id  =  T2.owner_id
Database: dog_kennels (tables: dogs, treatments)
Question: List the names of the dogs of the rarest breed and the treatment dates of them.
SQL: SELECT T1.name ,  T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id  =  T2.dog_id WHERE T1.breed_code  =  ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )
Database: dog_kennels (tables: dogs, treatments)
Question: Which dogs are of the rarest breed? Show their names and treatment dates.
SQL: SELECT T1.name ,  T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id  =  T2.dog_id WHERE T1.breed_code  =  ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )
Database: dog_kennels (tables: owners, dogs)
Question: Which dogs are owned by someone who lives in Virginia? List the owner's first name and the dog's name.
SQL: SELECT T1.first_name ,  T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id  =  T2.owner_id WHERE T1.state  =  'Virginia'
Database: dog_kennels (tables: owners, dogs)
Question: Find the first names of owners living in Virginia and the names of dogs they own.
SQL: SELECT T1.first_name ,  T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id  =  T2.owner_id WHERE T1.state  =  'Virginia'
Database: dog_kennels (tables: dogs, treatments)
Question: What are the arriving date and the departing date of the dogs who have gone through a treatment?
SQL: SELECT DISTINCT T1.date_arrived ,  T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id  =  T2.dog_id
Database: dog_kennels (tables: dogs, treatments)
Question: Find the arriving date and the departing date of the dogs that received a treatment.
SQL: SELECT DISTINCT T1.date_arrived ,  T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id  =  T2.dog_id
Database: dog_kennels (tables: owners, dogs)
Question: List the last name of the owner owning the youngest dog.
SQL: SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id  =  T2.owner_id WHERE T2.age  =  ( SELECT max(age) FROM Dogs )
Database: dog_kennels (tables: owners, dogs)
Question: Who owns the youngest dog? Give me his or her last name.
SQL: SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id  =  T2.owner_id WHERE T2.age  =  ( SELECT max(age) FROM Dogs )
Database: dog_kennels (tables: professionals)
Question: List the emails of the professionals who live in the state of Hawaii or the state of Wisconsin.
SQL: SELECT email_address FROM Professionals WHERE state  =  'Hawaii' OR state  =  'Wisconsin'
Database: dog_kennels (tables: professionals)
Question: What are the emails of the professionals living in either the state of Hawaii or the state of Wisconsin?
SQL: SELECT email_address FROM Professionals WHERE state  =  'Hawaii' OR state  =  'Wisconsin'
Database: dog_kennels (tables: dogs)
Question: What are the arriving date and the departing date of all the dogs?
SQL: SELECT date_arrived ,  date_departed FROM Dogs
Database: dog_kennels (tables: dogs)
Question: List the arrival date and the departure date for all the dogs.
SQL: SELECT date_arrived ,  date_departed FROM Dogs
Database: dog_kennels (tables: treatments)
Question: How many dogs went through any treatments?
SQL: SELECT count(DISTINCT dog_id) FROM Treatments
Database: dog_kennels (tables: treatments)
Question: Count the number of dogs that went through a treatment.
SQL: SELECT count(DISTINCT dog_id) FROM Treatments
Database: dog_kennels (tables: treatments)
Question: How many professionals have performed any treatment to dogs?
SQL: SELECT count(DISTINCT professional_id) FROM Treatments
Database: dog_kennels (tables: treatments)
Question: Find the number of professionals who have ever treated dogs.
SQL: SELECT count(DISTINCT professional_id) FROM Treatments
Database: dog_kennels (tables: professionals)
Question: Which professionals live in a city containing the substring 'West'? List his or her role, street, city and state.
SQL: SELECT role_code ,  street ,  city ,  state FROM professionals WHERE city LIKE '%West%'
Database: dog_kennels (tables: professionals)
Question: Find the role, street, city and state of the professionals living in a city that contains the substring 'West'.
SQL: SELECT role_code ,  street ,  city ,  state FROM professionals WHERE city LIKE '%West%'
Database: dog_kennels (tables: owners)
Question: Which owners live in the state whose name contains the substring 'North'? List his first name, last name and email.
SQL: SELECT first_name ,  last_name ,  email_address FROM Owners WHERE state LIKE '%North%'
Database: dog_kennels (tables: owners)
Question: Return the first name, last name and email of the owners living in a state whose name contains the substring 'North'.
SQL: SELECT first_name ,  last_name ,  email_address FROM Owners WHERE state LIKE '%North%'
Database: dog_kennels (tables: dogs)
Question: How many dogs have an age below the average?
SQL: SELECT count(*) FROM Dogs WHERE age  <  ( SELECT avg(age) FROM Dogs )
Database: dog_kennels (tables: dogs)
Question: Count the number of dogs of an age below the average.
SQL: SELECT count(*) FROM Dogs WHERE age  <  ( SELECT avg(age) FROM Dogs )
Database: dog_kennels (tables: treatments)
Question: How much does the most recent treatment cost?
SQL: SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1
Database: dog_kennels (tables: treatments)
Question: Show me the cost of the most recently performed treatment.
SQL: SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1
Database: dog_kennels (tables: dogs, treatments)
Question: How many dogs have not gone through any treatment?
SQL: SELECT count(*) FROM Dogs WHERE dog_id NOT IN ( SELECT dog_id FROM Treatments )
Database: dog_kennels (tables: treatments, dogs)
Question: Tell me the number of dogs that have not received any treatment .
SQL: select count(*) from dogs where dog_id not in ( select dog_id from treatments )
Database: dog_kennels (tables: owners, dogs)
Question: How many owners temporarily do not have any dogs?
SQL: SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )
Database: dog_kennels (tables: owners, dogs)
Question: Find the number of owners who do not own any dogs at this moment.
SQL: SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )
Database: dog_kennels (tables: professionals, treatments)
Question: How many professionals did not operate any treatment on dogs?
SQL: SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )
Database: dog_kennels (tables: professionals, treatments)
Question: Find the number of professionals who have not treated any dogs.
SQL: SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )
Database: dog_kennels (tables: dogs)
Question: List the dog name, age and weight of the dogs who have been abandoned? 1 stands for yes, and 0 stands for no.
SQL: SELECT name ,  age ,  weight FROM Dogs WHERE abandoned_yn  =  1
Database: dog_kennels (tables: dogs)
Question: What are the dog name, age and weight of the dogs that were abandoned? Note that 1 stands for yes, and 0 stands for no in the tables.
SQL: SELECT name ,  age ,  weight FROM Dogs WHERE abandoned_yn  =  1
Database: dog_kennels (tables: dogs)
Question: What is the average age of all the dogs?
SQL: SELECT avg(age) FROM Dogs
Database: dog_kennels (tables: dogs)
Question: Compute the average age of all the dogs.
SQL: SELECT avg(age) FROM Dogs
Database: dog_kennels (tables: dogs)
Question: What is the age of the oldest dog?
SQL: SELECT max(age) FROM Dogs
Database: dog_kennels (tables: dogs)
Question: Tell me the age of the oldest dog.
SQL: SELECT max(age) FROM Dogs
Database: dog_kennels (tables: charges)
Question: How much does each charge type costs? List both charge type and amount.
SQL: SELECT charge_type ,  charge_amount FROM Charges
Database: dog_kennels (tables: charges)
Question: List each charge type and its amount.
SQL: SELECT charge_type ,  charge_amount FROM Charges
Database: dog_kennels (tables: charges)
Question: How much does the most expensive charge type costs?
SQL: SELECT max(charge_amount) FROM Charges
Database: dog_kennels (tables: charges)
Question: What is the charge amount of the most expensive charge type?
SQL: SELECT max(charge_amount) FROM Charges
Database: dog_kennels (tables: professionals)
Question: List the email, cell phone and home phone of all the professionals.
SQL: SELECT email_address ,  cell_number ,  home_phone FROM professionals
Database: dog_kennels (tables: professionals)
Question: What are the email, cell phone and home phone of each professional?
SQL: SELECT email_address ,  cell_number ,  home_phone FROM professionals
Database: dog_kennels (tables: dogs)
Question: What are all the possible breed type and size type combinations?
SQL: SELECT DISTINCT breed_code ,  size_code FROM dogs
Database: dog_kennels (tables: dogs)
Question: Find the distinct breed type and size type combinations for dogs.
SQL: SELECT DISTINCT breed_code ,  size_code FROM dogs
Database: dog_kennels (tables: treatment_types, treatments, professionals)
Question: List the first name of all the professionals along with the description of the treatment they have done.
SQL: SELECT DISTINCT T1.first_name ,  T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id  =  T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code  =  T3.treatment_type_code
Database: dog_kennels (tables: treatment_types, treatments, professionals)
Question: What are each professional's first name and description of the treatment they have performed?
SQL: SELECT DISTINCT T1.first_name ,  T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id  =  T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code  =  T3.treatment_type_code
Database: singer (tables: singer)
Question: How many singers are there?
SQL: SELECT count(*) FROM singer
Database: singer (tables: singer)
Question: What is the count of singers?
SQL: SELECT count(*) FROM singer
Database: singer (tables: singer)
Question: List the name of singers in ascending order of net worth.
SQL: SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC
Database: singer (tables: singer)
Question: What are the names of singers ordered by ascending net worth?
SQL: SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC
Database: singer (tables: singer)
Question: What are the birth year and citizenship of singers?
SQL: SELECT Birth_Year ,  Citizenship FROM singer
Database: singer (tables: singer)
Question: What are the birth years and citizenships of the singers?
SQL: SELECT Birth_Year ,  Citizenship FROM singer
Database: singer (tables: singer)
Question: List the name of singers whose citizenship is not "France".
SQL: SELECT Name FROM singer WHERE Citizenship != "France"
Database: singer (tables: singer)
Question: What are the names of the singers who are not French citizens?
SQL: SELECT Name FROM singer WHERE Citizenship != "France"
Database: singer (tables: singer)
Question: Show the name of singers whose birth year is either 1948 or 1949?
SQL: SELECT Name FROM singer WHERE Birth_Year  =  1948 OR Birth_Year  =  1949
Database: singer (tables: singer)
Question: What are the names of the singers whose birth years are either 1948 or 1949?
SQL: SELECT Name FROM singer WHERE Birth_Year  =  1948 OR Birth_Year  =  1949
Database: singer (tables: singer)
Question: What is the name of the singer with the largest net worth?
SQL: SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1
Database: singer (tables: singer)
Question: What is the name of the singer who is worth the most?
SQL: SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1
Database: singer (tables: singer)
Question: Show different citizenship of singers and the number of singers of each citizenship.
SQL: SELECT Citizenship ,  COUNT(*) FROM singer GROUP BY Citizenship
Database: singer (tables: singer)
Question: For each citizenship, how many singers are from that country?
SQL: SELECT Citizenship ,  COUNT(*) FROM singer GROUP BY Citizenship
Database: singer (tables: singer)
Question: Please show the most common citizenship of singers.
SQL: SELECT Citizenship FROM singer GROUP BY Citizenship ORDER BY COUNT(*) DESC LIMIT 1
Database: singer (tables: singer)
Question: What is the most common singer citizenship ?
SQL: select citizenship from singer group by citizenship order by count(*) desc limit 1
Database: singer (tables: singer)
Question: Show different citizenships and the maximum net worth of singers of each citizenship.
SQL: SELECT Citizenship ,  max(Net_Worth_Millions) FROM singer GROUP BY Citizenship
Database: singer (tables: singer)
Question: For each citizenship, what is the maximum net worth?
SQL: SELECT Citizenship ,  max(Net_Worth_Millions) FROM singer GROUP BY Citizenship