Dataset Viewer
Auto-converted to Parquet Duplicate
question
stringlengths
43
589
query
stringlengths
19
598
What is the most used instrument? Schema: - Instruments(COUNT, Instrument)
SELECT Instrument FROM Instruments WHERE Instrument IS NOT NULL GROUP BY Instrument ORDER BY COUNT(*) DESC NULLS LAST LIMIT 1;
What is the total number of campuses? Schema: - Campuses(Campus, County, Franc, Location)
SELECT COUNT(*) AS num_campuses FROM Campuses;
what is the longest river in the state with the highest point? Schema: - highlow(M, highest_elevation, highest_point, lowest_elevation, lowest_point, state_name) - river(COUNT, DIST, LENGTH, M, country_name, illino, m, river_name, traverse)
SELECT T1.river_name FROM highlow AS T2 JOIN river AS T1 ON T1.traverse = T2.state_name WHERE T2.highest_elevation = (SELECT MAX(highest_elevation) FROM highlow) ORDER BY T1.LENGTH DESC NULLS LAST LIMIT 1;
What is the name of the entrepreneur with the greatest weight? Schema: - entrepreneur(COUNT, Company, Investor, Money_Requested) - people(Age, Birth_Date, Birth_Place, COUNT, Country, Date_of_Birth, Height, Hometown, Is_Male, Name, Nationality, Party, ... (3 more))
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC NULLS LAST LIMIT 1;
What is the description of the club "Pen and Paper Gaming"? Schema: - Club(ClubDesc, ClubLocation, ClubName, Enterpr, Gam, Hopk, Tenn)
SELECT ClubDesc FROM Club WHERE ClubName = 'Pen and Paper Gaming';
What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'? Schema: - Products(COUNT, Code, Din, Manufacturer, Name, Price, Product_Name, Product_Price, Product_Type_Code, T1, Trad, cum, ... (11 more)) - Ref_Product_Categories(product_category_code, product_category_description, unit_of_measure) - Ref_Colors(color_description)
SELECT T1.product_name FROM Products AS T1 JOIN Ref_Product_Categories AS T2 ON T1.product_category_code = T2.product_category_code JOIN Ref_Colors AS T3 ON T1.color_code = T3.color_code WHERE T3.color_description = 'white' AND T2.unit_of_measure != 'Handful';
how many papers appeared at nature communications last year? Schema: - venue(venueId, venueName) - paper(For, Switch, journalId, juic, learn, mach, paperId, title, venueId, year)
SELECT DISTINCT COUNT(T1.paperId) AS num_papers FROM venue AS T2 JOIN paper AS T1 ON T2.venueId = T1.venueId WHERE T1."year" = 2015 AND T2.venueName = 'nature communications';
What are the names of everybody who has exactly one friend? Schema: - PersonFriend(M, friend, name)
SELECT name FROM PersonFriend WHERE name IS NOT NULL GROUP BY name HAVING COUNT(*) = 1;
What is the number of routes that end at John F Kennedy International Airport? Schema: - airports(AirportCode, AirportName, Argent, COUNT, City, Country, city, country, elevation, name) - routes(...)
SELECT COUNT(*) AS num_routes FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport';
List all headquarters and the number of companies in each headquarter.? Schema: - company(Bank, COUNT, Company, Headquarters, Industry, JO, Main_Industry, Market_Value, Name, Profits_in_Billion, Rank, Retail, ... (4 more))
SELECT Headquarters, COUNT(*) AS num_companies FROM company GROUP BY Headquarters;
Which producer has worked with the most number of directors ? Schema: - director(Afghan, name, nationality) - directed_by(...) - movie(Budget_million, Director, Find, Gross_worldwide, T1, Title, Year, budget, release_year, title) - made_by(...) - producer(...)
SELECT T1.name FROM director AS T3 JOIN directed_by AS T2 ON T3.did = T2.did JOIN movie AS T4 ON T4.mid = T2.msid JOIN made_by AS T5 ON T4.mid = T5.msid JOIN producer AS T1 ON T1.pid = T5.pid GROUP BY T1.name ORDER BY COUNT(DISTINCT T3.name) DESC NULLS LAST LIMIT 1;
How many papers written on ImageNet ? Schema: - paperDataset(...) - dataset(...) - paper(For, Switch, journalId, juic, learn, mach, paperId, title, venueId, year)
SELECT DISTINCT COUNT(DISTINCT T3.paperId) AS num_papers FROM paperDataset AS T2 JOIN dataset AS T1 ON T2.datasetId = T1.datasetId JOIN paper AS T3 ON T3.paperId = T2.paperId WHERE T1.datasetName LIKE 'ImageNet';
What are the dates of the latest logon of the students with family name "Jaskolski" or "Langosh"? Schema: - Students(cell_mobile_number, current_address_id, date_first_registered, date_left, date_of_latest_logon, email_address, family_name, first_name, last_name, login_name, middle_name, other_student_details, ... (1 more))
SELECT date_of_latest_logon FROM Students WHERE family_name = 'Jaskolski' OR family_name = 'Langosh';
For all the faults of different parts, what are all the decriptions of the skills required to fix them? List the name of the faults and the skill description.? Schema: - Part_Faults(...) - Skills_Required_To_Fix(...) - Skills(...)
SELECT T1.fault_short_name, T3.skill_description FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id;
which state has the lowest point that borders idaho? Schema: - highlow(M, highest_elevation, highest_point, lowest_elevation, lowest_point, state_name) - border_info(T1, border, state_name)
SELECT state_name FROM highlow WHERE lowest_elevation = (SELECT MIN(lowest_elevation) FROM highlow WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'idaho')) AND state_name IN (SELECT border FROM border_info WHERE state_name = 'idaho');
How many different forms of governments are there in Africa? Schema: - country(Capital, Continent, Country_name, Engl, GNP, GovernmentForm, HeadOfState, IndepYear, LifeExpectancy, M, Name, Official_native_language, ... (4 more))
SELECT COUNT(DISTINCT GovernmentForm) AS num_governments FROM country WHERE Continent = 'Africa';
Find the match ids of the cities that hosted competition "1994 FIFA World Cup qualification"? Schema: - match_(Competition, Date, Match_ID, Venue)
SELECT Match_ID FROM match_ WHERE Competition = '1994 FIFA World Cup qualification';
What is the genre of the movie " Jurassic Park " ? Schema: - genre(g_name, rating) - classification(...) - movie(Budget_million, Director, Find, Gross_worldwide, T1, Title, Year, budget, release_year, title)
SELECT T2.genre FROM genre AS T2 JOIN classification AS T1 ON T2.gid = T1.gid JOIN movie AS T3 ON T3.mid = T1.msid WHERE T3.title = 'Jurassic Park';
Find the role, street, city and state of the professionals living in a city that contains the substring 'West'.? Schema: - Professionals(Wiscons, cell_number, city, email_address, home_phone, role_code, state, street)
SELECT role_code, street, city, state FROM Professionals WHERE city LIKE '%West%';
Find the names of departments that are either in division AS or in division EN and in Building NEB.? Schema: - Department(Building, COUNT, DNO, DName, DPhone, DepartmentID, Division, FacID, Head, LName, Room, T2)
SELECT DISTINCT DName FROM (SELECT DName FROM Department WHERE Division = 'AS' UNION ALL SELECT DName FROM Department WHERE Division = 'EN' AND Building = 'NEB');
What is the first and last name of all students who are younger than average? Schema: - Student(Advisor, Age, COUNT, Fname, L, LName, M, Major, Sex, StuID, city_code, oldest_age)
SELECT Fname, LName FROM Student WHERE Age < (SELECT AVG(Age) FROM Student);
What are the different software platforms for devices, and how many devices have each? Schema: - device(COUNT, Carrier, Software_Platform)
SELECT Software_Platform, COUNT(*) AS num_devices FROM device GROUP BY Software_Platform;
List the name of the company that produced more than one phone model.? Schema: - phone(Accreditation_level, Accreditation_type, COUNT, Carrier, Company_name, Hardware_Model_name, Memory_in_G, Name, Spr, chip_model, p1, screen_mode)
SELECT Company_name FROM phone WHERE Company_name IS NOT NULL GROUP BY Company_name HAVING COUNT(*) > 1;
What are the names of projects that have not been assigned? Schema: - Projects(COUNT, Hours, Name, Project_Details, Project_ID, organ, organisation_id, project_details) - AssignedTo(Scientist)
SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo);
How many races are there? Schema: - race(Class, Date, Name)
SELECT COUNT(*) AS num_races FROM race;
How many papers does Christopher D. Manning have ? Schema: - writes(...) - author(...)
SELECT DISTINCT COUNT(DISTINCT T2.paperId) AS num_papers FROM writes AS T2 JOIN author AS T1 ON T2.authorId = T1.authorId WHERE T1.authorName = 'Christopher D. Manning';
What is the status of the city that has hosted the most competitions? Schema: - city(COUNT, City, District, GDP, M, Name, Official_Name, Population, Regional_Population, SUM, Status, T1, ... (10 more)) - farm_competition(Hosts, Theme, Year)
SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID, T1.Status ORDER BY COUNT(*) DESC NULLS LAST LIMIT 1;
What campus has the most degrees conferrred over its entire existence? Schema: - degrees(Campus, Degrees, SUM, Year)
SELECT Campus FROM degrees WHERE Campus IS NOT NULL GROUP BY Campus ORDER BY SUM(Degrees) DESC NULLS LAST LIMIT 1;
Which city has hosted the most events? Schema: - city(COUNT, City, District, GDP, M, Name, Official_Name, Population, Regional_Population, SUM, Status, T1, ... (10 more)) - hosting_city(Host_City, Year)
SELECT T1.City FROM city AS T1 JOIN hosting_city AS T2 ON T1.City_ID = T2.Host_City GROUP BY T2.Host_City, T1.City ORDER BY COUNT(*) DESC NULLS LAST LIMIT 1;
What are the card numbers, names, and hometowns of every member ordered by descending level? Schema: - member_(Address, Age, COUNT, Card_Number, Country, Hometown, Level, Member_ID, Member_Name, Membership_card, Name, Party_ID, ... (1 more))
SELECT Card_Number, Name, Hometown FROM member_ ORDER BY Level DESC NULLS LAST;
How many faculty do we have? Schema: - Faculty(Building, COUNT, FacID, Fname, LName, Lname, Phone, Pr, Rank, Room, Sex)
SELECT COUNT(*) AS num_faculty FROM Faculty;
For each dorm, how many amenities does it have? Schema: - Dorm(dorm_name, gender, student_capacity) - Has_amenity(dormid)
SELECT COUNT(*) AS num_amenities, T1.dormid FROM Dorm AS T1 JOIN Has_amenity AS T2 ON T1.dormid = T2.dormid WHERE T1.student_capacity > 100 GROUP BY T1.dormid;
List the title of all Cartoons showed on TV Channel with series name "Sky Radio".? Schema: - TV_Channel(Content, Country, Engl, Hight_definition_TV, Language, Package_Option, Pixel_aspect_ratio_PAR, id, series_name) - Cartoon(Channel, Directed_by, Original_air_date, Production_code, Title, Written_by)
SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = 'Sky Radio';
What is the name of the different car makers who produced a car in 1970? Schema: - car_makers(...) - model_list(Maker, Model) - car_names(COUNT, Model) - cars_data(Accelerate, Cylinders, Horsepower, MPG, T1, Weight, Year)
SELECT DISTINCT T1.Maker FROM car_makers AS T1 JOIN model_list AS T2 ON T1.Id = T2.Maker JOIN car_names AS T3 ON T2.Model = T3.Model JOIN cars_data AS T4 ON T3.MakeId = T4.Id WHERE T4."Year" = '1970';
What are the teams that have the 5 oldest players? Schema: - player(Age, COUNT, Gender, Occupation, Player, Player_name, Po, Points, Position, Residence, Sponsor_name, T1, ... (12 more))
SELECT Team FROM player ORDER BY Age DESC NULLS LAST LIMIT 5;
List the names of people that are not employed by any company? Schema: - people(Age, Birth_Date, Birth_Place, COUNT, Country, Date_of_Birth, Height, Hometown, Is_Male, Name, Nationality, Party, ... (3 more)) - employment(...)
SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM employment);
keyphrases used by Luke Zettlemoyer? Schema: - paperKeyphrase(...) - keyphrase(...) - paper(For, Switch, journalId, juic, learn, mach, paperId, title, venueId, year) - writes(...) - author(...)
SELECT DISTINCT T1.keyphraseId FROM paperKeyphrase AS T2 JOIN keyphrase AS T1 ON T2.keyphraseId = T1.keyphraseId JOIN paper AS T3 ON T3.paperId = T2.paperId JOIN writes AS T4 ON T4.paperId = T3.paperId JOIN author AS T5 ON T4.authorId = T5.authorId WHERE T5.authorName = 'Luke Zettlemoyer';
what is the biggest city in the smallest state? Schema: - city(COUNT, City, District, GDP, M, Name, Official_Name, Population, Regional_Population, SUM, Status, T1, ... (10 more)) - state(M, area, aust, capital, country_name, density, population, population_per_square_km, rhode, state_name, wyom)
SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name IN (SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state))) AND state_name IN (SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state));
What is the average number of bank customers? Schema: - bank(SUM, bname, city, morn, no_of_customers, state)
SELECT AVG(no_of_customers) AS avg_no_of_customers FROM bank;
What are the names of all teams? Schema: - team(Name)
SELECT Name FROM team;
Find the names of states that have some college students playing in the mid position but not in the goalie position.? Schema: - College(M, cName, enr, state) - Tryout(COUNT, EX, T1, cName, decision, pPos)
SELECT DISTINCT T1.state FROM College AS T1 JOIN Tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' AND T1.state NOT IN (SELECT T1.state FROM College AS T1 JOIN Tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie');
How many students are affected by each allergy type? Schema: - Has_Allergy(Allergy, COUNT, StuID) - Allergy_Type(Allergy, AllergyType, COUNT)
SELECT T2.AllergyType, COUNT(*) AS num_students FROM Has_Allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy GROUP BY T2.AllergyType;
How many different roles are there on the project staff? Schema: - Project_Staff(COUNT, date_from, date_to, role_code)
SELECT COUNT(DISTINCT role_code) AS num_roles FROM Project_Staff;
List the authors who do not have submission to any workshop.? Schema: - submission(Author, COUNT, College, Scores) - Acceptance(...)
SELECT Author FROM submission WHERE Submission_ID NOT IN (SELECT Submission_ID FROM Acceptance);
Show the minimum, maximum, average price for all products.? Schema: - Products(COUNT, Code, Din, Manufacturer, Name, Price, Product_Name, Product_Price, Product_Type_Code, T1, Trad, cum, ... (11 more))
SELECT MIN(product_price) AS min_price, MAX(product_price) AS max_price, AVG(product_price) AS avg_price FROM Products;
How many people reviewed restaurant " Vintner Grill " in 2010 ? Schema: - category(...) - business(business_id, city, full_address, name, rating, review_count, state) - review(i_id, rank, rating, text) - user_(name)
SELECT COUNT(DISTINCT T4.name) AS num_reviewers FROM category AS T2 JOIN business AS T1 ON T2.business_id = T1.business_id JOIN review AS T3 ON T3.business_id = T1.business_id JOIN user_ AS T4 ON T4.user_id = T3.user_id WHERE T1.name = 'Vintner Grill' AND T3."year" = 2010;
Find the average age of members of the club "Hopkins Student Enterprises".? Schema: - Club(ClubDesc, ClubLocation, ClubName, Enterpr, Gam, Hopk, Tenn) - Member_of_club(...) - Student(Advisor, Age, COUNT, Fname, L, LName, M, Major, Sex, StuID, city_code, oldest_age)
SELECT AVG(T3.Age) AS avg_age FROM Club AS T1 JOIN Member_of_club AS T2 ON T1.ClubID = T2.ClubID JOIN Student AS T3 ON T2.StuID = T3.StuID WHERE T1.ClubName = 'Hopkins Student Enterprises';
Return the maximum and minimum number of cities across all markets.? Schema: - market(Country, Number_cities)
SELECT MAX(Number_cities) AS max_number_cities, MIN(Number_cities) AS min_number_cities FROM market;
What is the name of the song that was released in the most recent year? Schema: - song(COUNT, M, art, artist_name, engl, f_id, genre_is, languages, rat, rating, releasedate, resolution, ... (1 more))
SELECT song_name, releasedate FROM song ORDER BY releasedate DESC NULLS LAST LIMIT 1;
first deep learning paper? Schema: - paperKeyphrase(...) - keyphrase(...) - paper(For, Switch, journalId, juic, learn, mach, paperId, title, venueId, year)
SELECT DISTINCT T3."year" FROM paperKeyphrase AS T2 JOIN keyphrase AS T1 ON T2.keyphraseId = T1.keyphraseId JOIN paper AS T3 ON T3.paperId = T2.paperId WHERE T1.keyphraseName = 'deep learning' GROUP BY T3."year" ORDER BY T3."year" ASC NULLS LAST;
List all countries and their number of airlines in the descending order of number of airlines.? Schema: - airlines(Abbreviation, Airline, COUNT, Country, active, country, name)
SELECT country, COUNT(*) AS num_airlines FROM airlines WHERE country IS NOT NULL GROUP BY country ORDER BY num_airlines DESC NULLS LAST;
What is the average quantities ordered with payment method code "MasterCard" on invoices? Schema: - Invoices(COUNT, DOUBLE, Order_Quantity, Product_ID, TRY_CAST, invoice_date, invoice_details, invoice_number, order_id, payment_method_code)
SELECT AVG(TRY_CAST(Order_Quantity AS DOUBLE)) AS avg_quantity FROM Invoices WHERE payment_method_code = 'MasterCard';
Return the countries of the mountains that have a height larger than 5000.? Schema: - mountain(AVG, COUNT, Country, Height, JO, Name, Prominence, Range, T1, mck, mounta, mountain_altitude, ... (3 more))
SELECT Country FROM mountain WHERE Height > 5000;
What is the average fee for a CSU campus in the year of 1996? Schema: - csu_fees(CampusFee)
SELECT AVG(CampusFee) AS avg_fee FROM csu_fees WHERE "Year" = 1996;
what are the major cities in the largest state? Schema: - city(COUNT, City, District, GDP, M, Name, Official_Name, Population, Regional_Population, SUM, Status, T1, ... (10 more)) - state(M, area, aust, capital, country_name, density, population, population_per_square_km, rhode, state_name, wyom)
SELECT city_name FROM city WHERE population > 150000 AND state_name = (SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state));
Find the last names of students with major 50.? Schema: - Student(Advisor, Age, COUNT, Fname, L, LName, M, Major, Sex, StuID, city_code, oldest_age)
SELECT LName FROM Student WHERE Major = 50;
What are the countries that contain 3 or more cities? Schema: - city(COUNT, City, District, GDP, M, Name, Official_Name, Population, Regional_Population, SUM, Status, T1, ... (10 more)) - country(Capital, Continent, Country_name, Engl, GNP, GovernmentForm, HeadOfState, IndepYear, LifeExpectancy, M, Name, Official_native_language, ... (4 more))
SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id, T2.country HAVING COUNT(*) >= 3;
What are the ids of the top three products that were purchased in the largest amount? Schema: - Product_Suppliers(COUNT, DOUBLE, TRY_CAST, product_id, supplier_id)
SELECT product_id FROM Product_Suppliers ORDER BY total_amount_purchased DESC NULLS LAST LIMIT 3;
Find the average and minimum price of the rooms in different decor.? Schema: - Rooms(K, RoomId, basePrice, bedType, beds, decor, maxOccupancy, roomName)
SELECT decor, AVG(basePrice) AS avg_price, MIN(basePrice) AS min_price FROM Rooms GROUP BY decor;
Count the number of employees for each city.? Schema: - employee(Address, Age, Bdate, City, Fname, Lname, Name, Salary, Sex, eid, name, salary)
SELECT COUNT(*) AS num_employees, City FROM employee GROUP BY City;
how many states border on the state whose capital is boston? Schema: - border_info(T1, border, state_name) - state(M, area, aust, capital, country_name, density, population, population_per_square_km, rhode, state_name, wyom)
SELECT COUNT(border) AS num_states FROM border_info WHERE state_name = (SELECT state_name FROM state WHERE capital = 'boston');
What is the genre name of the film HUNGER ROOF? Schema: - category(...) - film_category(...) - film(COUNT, Directed_by, Director, Gross_in_dollar, JO, LENGTH, Studio, T1, Title, language_id, rating, rental_rate, ... (3 more))
SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF';
List the number of invoices and the invoice total from California.? Schema: - invoices(billing_city, billing_country, billing_state, total)
SELECT billing_state, COUNT(*) AS num_invoices, SUM(total) AS total_invoices FROM invoices WHERE billing_state = 'CA' GROUP BY billing_state;
How many books fall into each category? Schema: - book_club(Author_or_Editor, Book_Title, COUNT, Category, Publ, Publisher, T1)
SELECT Category, COUNT(*) AS num_books FROM book_club GROUP BY Category;
Which continent has the most diverse languages? Schema: - country(Capital, Continent, Country_name, Engl, GNP, GovernmentForm, HeadOfState, IndepYear, LifeExpectancy, M, Name, Official_native_language, ... (4 more)) - countrylanguage(COUNT, CountryCode, Engl, Language)
SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC NULLS LAST LIMIT 1;
What is the maximum number of final tables made among poker players with earnings less than 200000? Schema: - poker_player(Best_Finish, Earnings, Final_Table_Made, Money_Rank)
SELECT MAX(Final_Table_Made) AS max_final_table_made FROM poker_player WHERE Earnings < 200000;
What is the party of the youngest people? Schema: - people(Age, Birth_Date, Birth_Place, COUNT, Country, Date_of_Birth, Height, Hometown, Is_Male, Name, Nationality, Party, ... (3 more))
SELECT Party FROM people ORDER BY Age ASC NULLS LAST LIMIT 1;
What are the names and ids of all makers with more than 3 models? Schema: - car_makers(...) - model_list(Maker, Model)
SELECT T1.FullName, T1.Id FROM car_makers AS T1 JOIN model_list AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id, T1.FullName HAVING COUNT(*) > 3;
Show all sport name and the number of students.? Schema: - SportsInfo(COUNT, GamesPlayed, OnScholarship, SportName, StuID)
SELECT SportName, COUNT(*) AS num_students FROM SportsInfo GROUP BY SportName;
Which contact channel has been used by the customer with name "Tillman Ernser"? Schema: - Customers(BIGINT, COUNT, Customer_Details, Customer_ID, Customer_name, Mar, Rat, TRY_CAST, V, address_line_1, address_line_2, amount_outstanding, ... (25 more)) - Customer_Contact_Channels(DATEDIFF, DAY, active_from_date, active_to_date, channel_code, contact_number, diff)
SELECT DISTINCT channel_code FROM Customers AS T1 JOIN Customer_Contact_Channels AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = 'Tillman Ernser';
what is the capital of the texas state? Schema: - state(M, area, aust, capital, country_name, density, population, population_per_square_km, rhode, state_name, wyom)
SELECT capital FROM state WHERE state_name = 'texas';
What is the name of the country with the most car makers? Schema: - car_makers(...) - countries(...)
SELECT T2.CountryName FROM car_makers AS T1 JOIN countries AS T2 ON T1.CountryId = T2.CountryId GROUP BY T2.CountryId, T2.CountryName ORDER BY COUNT(*) DESC NULLS LAST LIMIT 1;
Select the name of the products with a price less than or equal to $200.? Schema: - Products(COUNT, Code, Din, Manufacturer, Name, Price, Product_Name, Product_Price, Product_Type_Code, T1, Trad, cum, ... (11 more))
SELECT Name FROM Products WHERE Price <= 200;
Count the number of songs.? Schema: - Songs(Title)
SELECT COUNT(*) AS num_songs FROM Songs;
How many states have a college with more students than average? Schema: - College(M, cName, enr, state)
SELECT COUNT(DISTINCT state) AS num_states FROM College WHERE enr > (SELECT AVG(enr) FROM College);
Count the number of party events.? Schema: - party_events(Event_Name)
SELECT COUNT(*) AS num_party_events FROM party_events;
What is the average price range of hotels for each each star rating code? Schema: - Hotels(hotel_id, other_hotel_details, pets_allowed_yn, price_range, star_rating_code)
SELECT star_rating_code, AVG(price_range) AS avg_price_range FROM Hotels GROUP BY star_rating_code;
Please show the names of aircrafts associated with airport with name "London Gatwick".? Schema: - aircraft(Description, aid, d, distance, name) - airport_aircraft(...) - airport(Airport_Name, City, Country, Domestic_Passengers, International_Passengers, Transit_Passengers, id, name)
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick';
What are the distinct names of customers with an order status of Pending, sorted by customer id? Schema: - Customers(BIGINT, COUNT, Customer_Details, Customer_ID, Customer_name, Mar, Rat, TRY_CAST, V, address_line_1, address_line_2, amount_outstanding, ... (25 more)) - Customer_Orders(customer_id, order_date, order_id, order_shipping_charges)
SELECT T1.customer_name FROM Customers AS T1 JOIN Customer_Orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Pending' GROUP BY T1.customer_name, T2.customer_id ORDER BY T2.customer_id ASC NULLS LAST;
return me the keyword, which have been contained by the most number of papers in VLDB conference .? Schema: - publication_keyword(...) - keyword(keyword) - publication(COUNT, Mak, Price, Publ, Publication_Date, Publisher, T1, abstract, citation_num, reference_num, title, year) - conference(homepage, name)
SELECT T1.keyword FROM publication_keyword AS T4 JOIN keyword AS T1 ON T4.kid = T1.kid JOIN publication AS T3 ON T3.pid = T4.pid JOIN conference AS T2 ON T3.cid = CAST(T2.cid AS TEXT) WHERE T2.name = 'VLDB' GROUP BY T1.keyword ORDER BY COUNT(DISTINCT T3.title) DESC NULLS LAST LIMIT 1;
recent research interests of sanjeev arora? Schema: - paperKeyphrase(...) - keyphrase(...) - paper(For, Switch, journalId, juic, learn, mach, paperId, title, venueId, year) - writes(...) - author(...)
SELECT DISTINCT T1.keyphraseName, T3."year" FROM paperKeyphrase AS T2 JOIN keyphrase AS T1 ON T2.keyphraseId = T1.keyphraseId JOIN paper AS T3 ON T3.paperId = T2.paperId JOIN writes AS T4 ON T4.paperId = T3.paperId JOIN author AS T5 ON T4.authorId = T5.authorId WHERE T5.authorName = 'sanjeev arora' ORDER BY T3."year" DESC NULLS LAST;
Give the names of the courses with at least five enrollments.? Schema: - Course(CName, Credits, Days) - Enrolled_in(Fname, Grade, LName, StuID, T2, T3, gradepoint)
SELECT T1.CName FROM Course AS T1 JOIN Enrolled_in AS T2 ON T1.CID = T2.CID GROUP BY T2.CID, T1.CName HAVING COUNT(*) >= 5;
What are the names of body builders? Schema: - body_builder(Clean_Jerk, Snatch, Total) - people(Age, Birth_Date, Birth_Place, COUNT, Country, Date_of_Birth, Height, Hometown, Is_Male, Name, Nationality, Party, ... (3 more))
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID;
list datasets for semantic parsing? Schema: - paperDataset(...) - dataset(...) - paperKeyphrase(...) - keyphrase(...)
SELECT DISTINCT T2.datasetId FROM paperDataset AS T3 JOIN dataset AS T2 ON T3.datasetId = T2.datasetId JOIN paperKeyphrase AS T1 ON T1.paperId = T3.paperId JOIN keyphrase AS T4 ON T1.keyphraseId = T4.keyphraseId WHERE T4.keyphraseName = 'semantic parsing';
Find the names of the customers who have an deputy policy.? Schema: - Policies(COUNT, Policy_Type_Code) - Customers(BIGINT, COUNT, Customer_Details, Customer_ID, Customer_name, Mar, Rat, TRY_CAST, V, address_line_1, address_line_2, amount_outstanding, ... (25 more))
SELECT DISTINCT T2.Customer_Details FROM Policies AS T1 JOIN Customers AS T2 ON T1.Customer_ID = T2.Customer_ID WHERE T1.Policy_Type_Code = 'Deputy';
List the names of technicians in ascending order of age.? Schema: - technician(Age, COUNT, JO, Start, Starting_Year, T1, Team, name)
SELECT name FROM technician ORDER BY Age ASC NULLS LAST;
What is the location name of the document "Robin CV"? Schema: - All_Documents(Date_Stored, Document_Name, Document_Type_Code) - Document_Locations(COUNT, Date_in_Location_From, Date_in_Locaton_To, Location_Code) - Ref_Locations(Location_Code, Location_Description, Location_Name)
SELECT T3.Location_Name FROM All_Documents AS T1 JOIN Document_Locations AS T2 ON T1.Document_ID = T2.Document_ID JOIN Ref_Locations AS T3 ON T2.Location_Code = T3.Location_Code WHERE T1.Document_Name = 'Robin CV';
Show id, first name and last name for all customers and the number of accounts.? Schema: - Accounts(Account_Details, Account_ID, Statement_ID, account_id, account_name, customer_id, date_account_opened, other_account_details) - Customers(BIGINT, COUNT, Customer_Details, Customer_ID, Customer_name, Mar, Rat, TRY_CAST, V, address_line_1, address_line_2, amount_outstanding, ... (25 more))
SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name, COUNT(*) AS num_accounts FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id, T2.customer_first_name, T2.customer_last_name;
What are the names and account balances of customers with the letter a in their names? Schema: - customer(COUNT, T1, acc_bal, acc_type, active, check, credit_score, cust_name, no_of_loans, sav, state, store_id)
SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%';
Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.? Schema: - College(M, cName, enr, state)
SELECT cName, enr FROM College WHERE enr > 10000 AND state = 'LA';
What are the names of all districts with a city area greater than 10 or have more than 100000 people living there? Schema: - district(City_Area, City_Population, District_name, d)
SELECT District_name FROM district WHERE City_Area > 10 OR City_Population > 100000;
Find the titles of all the papers written by "Aaron Turon".? Schema: - Authors(fname, lname) - Authorship(...) - Papers(title)
SELECT T3.title FROM Authors AS T1 JOIN Authorship AS T2 ON T1.authID = T2.authID JOIN Papers AS T3 ON T2.paperID = T3.paperID WHERE T1.fname = 'Aaron' AND T1.lname = 'Turon';
Return the names and ids of customers who have TN in their address.? Schema: - Customers(BIGINT, COUNT, Customer_Details, Customer_ID, Customer_name, Mar, Rat, TRY_CAST, V, address_line_1, address_line_2, amount_outstanding, ... (25 more))
SELECT customer_name, customer_id FROM Customers WHERE customer_address LIKE '%TN%';
How many students does KAWA GORDON teaches? Schema: - list(COUNT, Classroom, FirstName, Grade, LastName) - teachers(Classroom, FirstName, LastName)
SELECT COUNT(*) AS num_students FROM list AS T1 JOIN teachers AS T2 ON T1.Classroom = T2.Classroom WHERE T2.FirstName = 'KAWA' AND T2.LastName = 'GORDON';
what is the smallest state by area? Schema: - state(M, area, aust, capital, country_name, density, population, population_per_square_km, rhode, state_name, wyom)
SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state);
List all information about customer master index, and sort them by details in descending order.? Schema: - Customer_Master_Index(cmi_details)
SELECT * FROM Customer_Master_Index ORDER BY cmi_details DESC NULLS LAST;
What are the names of customers who do not have saving accounts? Schema: - customer(COUNT, T1, acc_bal, acc_type, active, check, credit_score, cust_name, no_of_loans, sav, state, store_id)
SELECT DISTINCT cust_name FROM customer WHERE cust_name NOT IN (SELECT cust_name FROM customer WHERE acc_type = 'saving');
What are the average and minimum price (in Euro) of all products? Schema: - Catalog_Contents(capacity, catalog_entry_name, height, next_entry_id, price_in_dollars, price_in_euros, product_stock_number)
SELECT AVG(price_in_euros) AS avg_price_in_euros, MIN(price_in_euros) AS min_price_in_euros FROM Catalog_Contents;
Which sport has most number of students on scholarship? Schema: - SportsInfo(COUNT, GamesPlayed, OnScholarship, SportName, StuID)
SELECT SportName FROM SportsInfo WHERE OnScholarship = 'Y' AND SportName IS NOT NULL GROUP BY SportName ORDER BY COUNT(*) DESC NULLS LAST LIMIT 1;
What is the number of invoices and total money billed in them from CA? Schema: - invoices(billing_city, billing_country, billing_state, total)
SELECT billing_state, COUNT(*) AS num_invoices, SUM(total) AS total_money_billed FROM invoices WHERE billing_state = 'CA' GROUP BY billing_state;
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
9