text
stringlengths
0
5.52k
SELECT date , zip_code FROM weather WHERE min_dew_point_f < (SELECT min(min_dew_point_f) FROM weather WHERE zip_code = 94107);
SELECT T1.id , T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id;
SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id = T2.id ORDER BY T2.dock_count DESC LIMIT 1;
SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city != "San Francisco";
SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city != "San Francisco";
SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS != "Fog" AND EVENTS != "Rain";
SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available) < 7;
SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg(bikes_available) > 10 EXCEPT SELECT name FROM station WHERE city = "San Jose";
SELECT name , lat , city FROM station ORDER BY lat LIMIT 1;
SELECT date , mean_temperature_f , mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3;
SELECT city , COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15;
SELECT start_station_id , start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200;
SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_visibility_miles) < 10;
SELECT city FROM station GROUP BY city ORDER BY max(lat) DESC;
SELECT date , cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5;
SELECT id , duration FROM trip ORDER BY duration DESC LIMIT 3;
SELECT T1.name , T1.long , avg(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id;
SELECT T1.name , T1.lat , min(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY T2.end_station_id;
SELECT DISTINCT start_station_name FROM trip WHERE duration < 100;
SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70;
SELECT id FROM trip WHERE duration >= (SELECT avg(duration) FROM trip WHERE zip_code = 94103);
SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31;
SELECT date , max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1;
SELECT DISTINCT T1.id , T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12;
SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_humidity) < 70 INTERSECT SELECT zip_code FROM trip GROUP BY zip_code HAVING count(*) >= 100;
SELECT name FROM station WHERE city = "Palo Alto" EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING count(*) > 100;
SELECT count(*) FROM station AS T1 JOIN trip AS T2 JOIN station AS T3 JOIN trip AS T4 ON T1.id = T2.start_station_id AND T2.id = T4.id AND T3.id = T4.end_station_id WHERE T1.city = "Mountain View" AND T3.city = "Palo Alto";
SELECT avg(T1.lat) , avg(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id;
SELECT count(*) FROM book;
SELECT Writer FROM book ORDER BY Writer ASC;
SELECT Title FROM book ORDER BY Issues ASC;
SELECT Title FROM book WHERE Writer != "Elaine Lee";
SELECT Title , Issues FROM book;
SELECT Publication_Date FROM publication ORDER BY Price DESC;
SELECT DISTINCT Publisher FROM publication WHERE Price > 5000000;
SELECT Publisher FROM publication ORDER BY Price DESC LIMIT 1;
SELECT Publication_Date FROM publication ORDER BY Price ASC LIMIT 3;
SELECT T1.Title , T2.Publication_Date FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID;
SELECT T1.Writer FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID WHERE T2.Price > 4000000;
SELECT T1.Title FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID ORDER BY T2.Price DESC;
SELECT Publisher FROM publication GROUP BY Publisher HAVING COUNT(*) > 1;
SELECT Publisher , COUNT(*) FROM publication GROUP BY Publisher;
SELECT Publication_Date FROM publication GROUP BY Publication_Date ORDER BY COUNT(*) DESC LIMIT 1;
SELECT Writer FROM book GROUP BY Writer HAVING COUNT(*) > 1;
SELECT Title FROM book WHERE Book_ID NOT IN (SELECT Book_ID FROM publication);
SELECT Publisher FROM publication WHERE Price > 10000000 INTERSECT SELECT Publisher FROM publication WHERE Price < 5000000;
SELECT COUNT (DISTINCT Publication_Date) FROM publication;
SELECT Price FROM publication WHERE Publisher = "Person" OR Publisher = "Wiley";
SELECT count(*) FROM actor;
SELECT Name FROM actor ORDER BY Name ASC;
SELECT Character , Duration FROM actor;
SELECT Name FROM actor WHERE Age != 20;
SELECT Character FROM actor ORDER BY age DESC;
SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1;
SELECT Name FROM musical WHERE Nominee = "Bob Fosse";
SELECT DISTINCT Nominee FROM musical WHERE Award != "Tony Award";
SELECT T1.Name , T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID;
SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = "The Phantom of the Opera";
SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC;
SELECT T2.Name , COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID;
SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3;
SELECT Nominee , COUNT(*) FROM musical GROUP BY Nominee;
SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1;
SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1;
SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2;
SELECT Name FROM musical WHERE Musical_ID NOT IN (SELECT Musical_ID FROM actor);
SELECT Nominee FROM musical WHERE Award = "Tony Award" INTERSECT SELECT Nominee FROM musical WHERE Award = "Drama Desk Award";
SELECT Nominee FROM musical WHERE Award = "Tony Award" OR Award = "Cleavant Derricks";
SELECT email FROM user_profiles WHERE name = 'Mary';
SELECT partitionid FROM user_profiles WHERE name = 'Iron Man';
SELECT count(*) FROM user_profiles;
SELECT count(*) FROM follows;
SELECT count(*) FROM follows GROUP BY f1;
SELECT count(*) FROM tweets;
SELECT count(DISTINCT UID) FROM tweets;
SELECT name , email FROM user_profiles WHERE name LIKE '%Swift%';
SELECT name FROM user_profiles WHERE email LIKE '%superstar%' OR email LIKE '%edu%';
SELECT text FROM tweets WHERE text LIKE '%intern%';
SELECT name , email FROM user_profiles WHERE followers > 1000;
SELECT T1.name FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING count(*) > (SELECT count(*) FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 WHERE T1.name = 'Tyler Swift');
SELECT T1.name , T1.email FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING count(*) > 1;
SELECT T1.name FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING count(*) > 1;
SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = "Mary" INTERSECT SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = "Susan";
SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = "Mary" OR T1.name = "Susan";
SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 1;
SELECT name , email FROM user_profiles ORDER BY followers LIMIT 1;
SELECT name , followers FROM user_profiles ORDER BY followers DESC;
SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 5;
SELECT text FROM tweets ORDER BY createdate;
SELECT T1.name , count(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid;
SELECT T1.name , T1.partitionid FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING count(*) < 2;
SELECT T1.name , count(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING count(*) > 1;
SELECT avg(followers) FROM user_profiles WHERE UID NOT IN (SELECT UID FROM tweets);
SELECT avg(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets);
SELECT max(followers) , sum(followers) FROM user_profiles;
SELECT distinct(catalog_entry_name) FROM catalog_contents;
SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING count(*) > 3;
SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = "Green";
SELECT catalog_level_name , catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10;
SELECT distinct(catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE "%Murray%";