db_id
stringlengths
3
31
query
stringlengths
20
523
question
stringlengths
3
224
schema
stringlengths
589
322M
query_res
stringlengths
0
363k
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Madison" AND t2.category_name = "escape games";
How many escape games are there in Madison ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.rating > 3.5 AND t2.category_name = "restaurant";
find the number of restaurant rated more than 3.5
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT SUM ( t4.count ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "restaurant" AND t3.category_name = "Moroccan";
find the total checkins in Moroccan restaurant in " Los Angeles "
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(None,)
yelp
SELECT SUM ( t4.count ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "Moroccan" AND t3.category_name = "restaurant" AND t4.day = "Friday";
find the total checkins in Moroccan restaurant in " Los Angeles " on Friday
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(None,)
yelp
SELECT t4.day , SUM ( t4.count ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "Moroccan" AND t3.category_name = "restaurant" GROUP BY t4.day;
find the total checkins in Moroccan restaurant in " Los Angeles " per day
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT t1.state , SUM ( t4.count ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t2.category_name = "Italian" AND t3.category_name = "Delis" AND t4.day = "Sunday" GROUP BY t1.state;
find the total checkins in Italian Delis in each state on Sunday
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT COUNT ( DISTINCT t1.text ) FROM USER AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t1.year = 2015 AND t2.name = "Niloofar";
How many reviews has Niloofar written in 2015
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT AVG ( t1.rating ) FROM USER AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t2.name = "Michelle";
what is the average rating given in Michelle reviews
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(None,)
yelp
SELECT t2.count FROM checkin AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "Cafe Zinho" AND t2.day = "Friday";
What is the number of checkins for " Cafe Zinho " on Friday
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT COUNT ( DISTINCT t3.name ) FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN USER AS t3 ON t3.user_id = t2.user_id WHERE t1.city = "Pittsburgh" AND t1.name = "Sushi Too";
how many users reviewed " Sushi Too " in Pittsburgh
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Pittsburgh" AND t1.rating = 4.5 AND t2.category_name = "restaurant";
What is the number of restaurant in Pittsburgh rated 4.5
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT text ) FROM tip WHERE YEAR = 2015;
How many tips have been written in 2015
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT SUM ( t1.likes ) FROM USER AS t2 JOIN tip AS t1 ON t2.user_id = t1.user_id WHERE t2.name = "Niloofar";
What is the total likes on tips from Niloofar
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(None,)
yelp
SELECT SUM ( t2.likes ) FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "Cafe Zinho";
What is the total likes on tips about " Cafe Zinho "
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(None,)
yelp
SELECT SUM ( t2.likes ) FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN USER AS t3 ON t3.user_id = t2.user_id WHERE t1.name = "Cafe Zinho" AND t3.name = "Niloofar";
What is the total likes on tips from Niloofar about " Cafe Zinho "
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(None,)
yelp
SELECT COUNT ( DISTINCT t1.text ) FROM USER AS t2 JOIN tip AS t1 ON t2.user_id = t1.user_id WHERE t1.year = 2010 AND t2.name = "Michelle";
How many tips has Michelle written in 2010
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t1.text ) FROM USER AS t2 JOIN tip AS t1 ON t2.user_id = t1.user_id WHERE t1.year = 2010 AND t2.name = "Michelle";
Return me the number of tips that are written by Michelle in 2010 .
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t1.text ) FROM USER AS t2 JOIN tip AS t1 ON t2.user_id = t1.user_id WHERE t1.month = "April" AND t2.name = "Michelle";
How many tips has Michelle written in April
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.state = "Texas" AND t2.category_name = "restaurant";
what is the number of restaurant in Texas
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Dallas" AND t1.rating > 3.5 AND t2.category_name = "Bars";
How many Bars in " Dallas " have a rating above 3.5 ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Dallas" AND t1.rating > 3.5 AND t2.category_name = "Bars";
How many Bars in Dallas have a rating above 3.5 ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t4.name ) 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.city = "Dallas" AND t1.name = "Texas de Brazil" AND t1.state = "Texas" AND t2.category_name = "restaurant";
How many people reviewed the restaurant " Texas de Brazil " in Dallas Texas ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t3.name ) FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN USER AS t3 ON t3.user_id = t2.user_id WHERE t1.name = "Bistro Di Napoli" AND t2.year = 2015;
How many people reviewed " Bistro Di Napoli " in 2015 ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t3 JOIN business AS t1 ON t3.business_id = t1.business_id JOIN neighbourhood AS t2 ON t2.business_id = t1.business_id WHERE t1.city = "Dallas" AND t3.category_name = "restaurant" AND t2.neighbourhood_name = "Hazelwood";
How many restaurant are there in the Hazelwood district of Dallas ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT business_id ) FROM business WHERE city = "Dallas" AND name = "Starbucks" AND state = "Texas";
How many Starbucks are there in Dallas Texas ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT review_count FROM business WHERE name = "Acacia Cafe";
How many reviews does " Acacia Cafe " have ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT AVG ( t3.count ) , t3.day FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN checkin AS t3 ON t3.business_id = t1.business_id WHERE t1.name = "Barrio Cafe" AND t2.category_name = "restaurant" GROUP BY t3.day;
Find the average number of checkins in restaurant " Barrio Cafe " per day
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM neighbourhood AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Madison" AND t2.neighbourhood_name = "Stone Meadows";
How many businesses are there in the " Stone Meadows " neighbourhood in Madison ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t1.text ) FROM USER AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t2.name = "Adrienne";
How many reviews has Adrienne written ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t1.text ) FROM USER AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t1.month = "March" AND t1.year = 2014 AND t2.name = "Michelle";
How many reviews has Michelle written in March 2014 ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN USER AS t3 ON t3.user_id = t2.user_id WHERE t2.year = 2010 AND t3.name = "Michelle";
How many businesses has Michelle reviewed in 2010 ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN USER AS t3 ON t3.user_id = t2.user_id WHERE t1.city = "San Diego" AND t2.year = 2010 AND t3.name = "Christine";
How many businesses in " San Diego " has Christine reviewed in 2010 ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT business_id ) FROM business WHERE city = "Los Angeles" AND name = "Target";
How many Target are there in " Los Angeles " ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t4.name ) 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.city = "Dallas" AND t2.category_name = "Irish Pub";
How many users have reviewed Irish Pub in Dallas ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT AVG ( rating ) FROM review WHERE YEAR = 2014;
What is the average rating of reviews written in year 2014 ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(None,)
yelp
SELECT COUNT ( DISTINCT t4.name ) 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 t2.category_name = "category_category_name0" AND t3.year = 2010;
How many people reviewed restaurant " Vintner Grill " in 2010 ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t3.text ) FROM neighbourhood AS t1 JOIN business AS t2 ON t1.business_id = t2.business_id JOIN review AS t3 ON t3.business_id = t2.business_id WHERE t1.neighbourhood_name = "South Summerlin";
Find the number of reviews on businesses located in " South Summerlin " neighbourhood
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT name ) FROM USER WHERE name = "Michelle";
Find the number of users called Michelle
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t2.category_name = "restaurant";
Return me the number of businesses that are restaurant .
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT city ) FROM business WHERE name = "Panda Express";
Return me the number of cities that has " Panda Express " .
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT t1.text ) FROM USER AS t2 JOIN tip AS t1 ON t2.user_id = t1.user_id WHERE t2.name = "Michelle";
Return me the number of tips that are written by Michelle .
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT SUM ( t3.count ) FROM checkin AS t3 JOIN business AS t1 ON t3.business_id = t1.business_id JOIN neighbourhood AS t2 ON t2.business_id = t1.business_id WHERE t2.neighbourhood_name = "Brighton Heights";
Find the total checkins in " Brighton Heights " neighbourhood
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(None,)
yelp
SELECT COUNT ( DISTINCT text ) FROM review WHERE MONTH = "March";
Find the total number of reviews written in March
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT COUNT ( DISTINCT text ) , MONTH FROM tip GROUP BY MONTH;
Find the number of tips written in each month
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT COUNT ( DISTINCT t1.neighbourhood_name ) FROM neighbourhood AS t1 JOIN business AS t2 ON t1.business_id = t2.business_id WHERE t2.city = "Madison" AND t2.rating = 5;
How many neighbourhoods have a business with rating 5 in Madison ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.state = "Texas" AND t2.category_name = "Moroccan" AND t3.category_name = "restaurant";
Give me all the Moroccan restaurant in Texas
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT t1.name FROM checkin AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id GROUP BY t1.name ORDER BY SUM ( t2.count ) DESC LIMIT 1;
which business has the most number of checkins
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT t1.neighbourhood_name FROM neighbourhood AS t1 JOIN business AS t2 ON t1.business_id = t2.business_id WHERE t2.city = "Madison" GROUP BY t1.neighbourhood_name ORDER BY COUNT ( DISTINCT t2.name ) DESC LIMIT 1;
which neighbourhood has the most number of businesses in Madison
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = "Dallas" AND t1.rating > 3.5 AND t2.category_name = "Mexican" AND t3.category_name = "restaurant";
Find all Mexican restaurant in Dallas with at least 3.5 stars
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = "Dallas" AND t1.rating > 3.5 AND t2.category_name = "Mexican" AND t3.category_name = "restaurant";
Find all Mexican restaurant in Dallas with a rating above 3.5
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = "Dallas" AND t1.state = "Texas" AND t2.category_name = "Valet Service" AND t3.category_name = "restaurant";
Find all restaurant with Valet Service in Dallas Texas
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT t1.name FROM category AS t3 JOIN business AS t1 ON t3.business_id = t1.business_id JOIN category AS t4 ON t4.business_id = t1.business_id JOIN neighbourhood AS t2 ON t2.business_id = t1.business_id WHERE t1.city = "Madison" AND t3.category_name = "Italian" AND t4.category_name = "restaurant" AND t2.neighbourhood_name = "Meadowood";
Find all Italian restaurant in the Meadowood neighbourhood of Madison
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t1.rating > 3 AND t1.review_count > 30 AND t2.category_name = "Bars";
Find all Bars in " Los Angeles " with at least 30 reviews and average rating above 3 stars
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = "Edinburgh" AND t2.category_name = "restaurant" AND t3.category_name = "Egyptian";
How many Egyptian restaurant are there in Edinburgh ?
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
(0,)
yelp
SELECT t2.name FROM USER AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id GROUP BY t2.name HAVING AVG ( t1.rating ) < 3;
Find users whose average review rating is below 3
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT t1.name FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t2.month = "April" GROUP BY t1.name ORDER BY COUNT ( DISTINCT t2.text ) DESC LIMIT 1;
Find the business with the most number of reviews in April
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id GROUP BY t1.name ORDER BY COUNT ( DISTINCT t2.category_name ) DESC LIMIT 1;
Find the business which has the most number of categories
PRAGMA foreign_keys = ON; CREATE TABLE "business" ( "bid" int, "business_id" text, "name" text, "full_address" text, "city" text, "latitude" text, "longitude" text, "review_count" int, "is_open" int, "rating" real, "state" text, primary key("bid") ); CREATE TABLE "category" ( "id" int, "business_id" text, "category_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "user" ( "uid" int, "user_id" text, "name" text, primary key("uid") ); CREATE TABLE "checkin" ( "cid" int, "business_id" text, "count" int, "day" text, primary key("cid"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "neighbourhood" ( "id" int, "business_id" text, "neighbourhood_name" text, primary key("id"), foreign key("business_id") references `business`("business_id") ); CREATE TABLE "review" ( "rid" int, "business_id" text, "user_id" text, "rating" real, "text" text, "year" int, "month" text, primary key("rid"), foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") ); CREATE TABLE "tip" ( "tip_id" int, "business_id" text, "text" text, "user_id" text, "likes" int, "year" int, "month" text, primary key("tip_id") foreign key("business_id") references `business`("business_id"), foreign key("user_id") references `user`("user_id") );
academic
SELECT homepage FROM journal WHERE name = "PVLDB";
return me the homepage of PVLDB .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT homepage FROM author WHERE name = "H. V. Jagadish";
return me the homepage of " H. V. Jagadish " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT abstract FROM publication WHERE title = "Making database systems usable";
return me the abstract of " Making database systems usable " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT YEAR FROM publication WHERE title = "Making database systems usable";
return me the year of " Making database systems usable "
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT YEAR FROM publication WHERE title = "Making database systems usable";
return me the year of " Making database systems usable " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT title FROM publication WHERE YEAR > 2000;
return me the papers after 2000 .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT homepage FROM conference WHERE name = "VLDB";
return me the homepage of the VLDB conference .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT keyword FROM keyword;
return me all the keywords .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT name FROM organization;
return me all the organizations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT name FROM organization WHERE continent = "North America";
return me all the organizations in " North America " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT homepage FROM organization WHERE name = "University of Michigan";
return me the homepage of " University of Michigan " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT reference_num FROM publication WHERE title = "Making database systems usable";
return me the number of references of " Making database systems usable " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT reference_num FROM publication WHERE title = "Making database systems usable";
return me the references of " Making database systems usable " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT citation_num FROM publication WHERE title = "Making database systems usable";
return me the number of citations of " Making database systems usable " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT citation_num FROM publication WHERE title = "Making database systems usable";
return me the citations of " Making database systems usable " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT title FROM publication WHERE citation_num > 200;
return me the paper with more than 200 citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = "PVLDB" AND t4.year = 2010;
return me the authors who have papers in PVLDB 2010 .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = "PVLDB" AND t4.year > 2010;
return me the authors who have papers in PVLDB after 2010 .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = "VLDB" AND t4.year = 2002;
return me the authors who have papers in VLDB conference in 2002 .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = "VLDB" AND t4.year < 2002;
return me the authors who have papers in VLDB conference before 2002 .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = "VLDB" AND t4.year < 2002 AND t4.year > 1995;
return me the authors who have papers in VLDB conference before 2002 after 1995 .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t3.name FROM DOMAIN AS t3 JOIN domain_journal AS t1 ON t3.did = t1.did JOIN journal AS t2 ON t2.jid = t1.jid WHERE t2.name = "PVLDB";
return me the area of PVLDB .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = "PVLDB";
return me the authors who have papers in PVLDB .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.name FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid WHERE t1.name = "H. V. Jagadish";
return me the organization " H. V. Jagadish " is in .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = "H. V. Jagadish";
return me the conferences, which have papers by " H. V. Jagadish " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = "H. V. Jagadish";
return me the journals, which have papers by " H. V. Jagadish " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.name FROM domain_author AS t3 JOIN author AS t1 ON t3.aid = t1.aid JOIN DOMAIN AS t2 ON t2.did = t3.did WHERE t1.name = "H. V. Jagadish";
return me the domain where " H. V. Jagadish " is focused .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM writes AS t2 JOIN author AS t1 ON t2.aid = t1.aid JOIN publication AS t3 ON t2.pid = t3.pid WHERE t3.title = "Making database systems usable";
return me the authors of " Making database systems usable " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t2.title = "Making database systems usable";
return me the conference, which published " Making database systems usable " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t3.title FROM writes AS t2 JOIN author AS t1 ON t2.aid = t1.aid JOIN publication AS t3 ON t2.pid = t3.pid WHERE t1.name = "H. V. Jagadish";
return me the papers by " H. V. Jagadish " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.title FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = "VLDB";
return me the papers on VLDB conference .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.title FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = "PVLDB";
return me the papers on PVLDB .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.title FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = "PVLDB" AND t2.year > 2000;
return me the papers on PVLDB after 2000 .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.title FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = "VLDB" AND t2.year > 2000;
return me the papers on VLDB conference after 2000 .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t4.title FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = "H. V. Jagadish" AND t2.name = "PVLDB";
return me the papers by " H. V. Jagadish " on PVLDB .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t4.title FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = "H. V. Jagadish" AND t2.name = "VLDB";
return me the papers by " H. V. Jagadish " on VLDB conference .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t3.title FROM writes AS t2 JOIN author AS t1 ON t2.aid = t1.aid JOIN publication AS t3 ON t2.pid = t3.pid WHERE t1.name = "H. V. Jagadish" AND t3.year > 2000;
return me the papers by " H. V. Jagadish " after 2000 .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t4.title FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = "H. V. Jagadish" AND t2.name = "PVLDB" AND t4.year > 2000;
return me the papers by " H. V. Jagadish " on PVLDB after 2000 .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t4.title FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = "H. V. Jagadish" AND t2.name = "VLDB" AND t4.year > 2000;
return me the papers by " H. V. Jagadish " on VLDB conference after 2000 .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.name FROM domain_conference AS t3 JOIN conference AS t1 ON t3.cid = t1.cid JOIN DOMAIN AS t2 ON t2.did = t3.did WHERE t1.name = "VLDB";
return me the area of the VLDB conference .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = "VLDB";
return me the authors who have papers in the VLDB conference .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.keyword FROM DOMAIN AS t3 JOIN domain_keyword AS t2 ON t3.did = t2.did JOIN keyword AS t1 ON t1.kid = t2.kid WHERE t3.name = "Databases";
return me all the keywords in Databases area .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t3.title FROM publication_keyword AS t2 JOIN keyword AS t1 ON t2.kid = t1.kid JOIN publication AS t3 ON t3.pid = t2.pid WHERE t1.keyword = "Natural Language";
return me all the papers, which contain the keyword " Natural Language " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );