1sf/bird-sql-train-with-schema huggingface dataset:
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: What is the gender of the majority of Vivo phone users?
Evidence: majority of Vivo phone users refers to MAX(COUNT(phone_brand = 'vivo'));
SQL: SELECT T.gender FROM ( SELECT T2.gender, COUNT(T2.gender) AS num FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T1.phone_brand = 'vivo' GROUP BY T2.gender ) AS T ORDER BY T.num DESC LIMIT 1
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: Which category has the highest number of users?
Evidence: highest number of users refers to MAX(COUNT(app_id));
SQL: SELECT T.category FROM ( SELECT T2.category, COUNT(T1.app_id) AS num FROM app_labels AS T1 INNER JOIN label_categories AS T2 ON T2.label_id = T1.label_id GROUP BY T1.app_id, T2.category ) AS T ORDER BY T.num DESC LIMIT 1
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: How many users belong to the MOBA category?
SQL: SELECT COUNT(T2.app_id) FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T2.label_id = T1.label_id WHERE T1.category = 'MOBA'
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: What is the percentage of female OPPO users against the male OPPO users?
Evidence: percentage = DIVIDE(MULTIPLY(CONCAT(COUNT(device_id WHERE phone_brand = 'OPPO' AND gender = 'F'), 100), COUNT(device_id)), '%') AS 'the percentage of female OPPO users'; DIVIDE(MULTIPLY(CONCAT(COUNT(device_id WHERE phone_brand = 'OPPO' AND gender = 'M'), 100), COUNT(device_id)), '%') AS 'the percentage of male OPPO users';
SQL: SELECT SUM(IIF(T2.gender = 'F', 1, 0)) * 100 / COUNT(T2.device_id) AS perFemale , SUM(IIF(T2.gender = 'M', 1, 0)) * 100 / COUNT(T2.device_id) AS perMale FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T1.phone_brand = 'OPPO'
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: What were the locations of the events on 8th May, 2016?
Evidence: location = longitude, latitude; on 8th May, 2016 refers to `timestamp` LIKE '2016-05-08%';
SQL: SELECT longitude, latitude FROM `events` WHERE SUBSTR(`timestamp`, 1, 10) = '2016-05-08'
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: List the app users IDs and installed status for the event ID of 844.
Evidence: app user IDs refers to app_id; is_installed = 1 means the app status is installed; is_installed = 0 means the app status is not installed;
SQL: SELECT app_id , IIF(is_installed = 1, 'YES', 'NO') AS status FROM app_events WHERE event_id = 844
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: How many events were there on 30th April, 2016?
Evidence: on 30th April, 2016 refers to `timestamp` LIKE '2016-04-30%';
SQL: SELECT COUNT(event_id) FROM events WHERE SUBSTR(`timestamp`, 1, 10) = '2016-04-30'
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: How many users used Vivo Xplay3S model?
Evidence: Vivo Xplay3S model refers to phone_brand = 'vivo' AND device_model = 'Xplay3S';
SQL: SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE device_model = 'Xplay3S' AND phone_brand = 'vivo'
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: What is the ratio of male and female users in 27-28 age group?
Evidence: ratio = DIVIDE(COUNT(device_id WHERE gender = 'M' AND `group` = 'M27-28'), COUNT(device_id WHERE gender = 'F' AND `group` = 'F27-28')); 27-28 age group refers to `group` = 'F27-28';
SQL: SELECT SUM(IIF(gender = 'M' AND `group` = 'M27-28', 1, 0)) / SUM(IIF(gender = 'F' AND `group` = 'F27-28', 1, 0)) AS r FROM gender_age
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: What are the labels' IDs of online shopping and online malls categories?
SQL: SELECT label_id FROM label_categories WHERE category IN ('online shopping', 'online malls')
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: Describe the phone brands and models of the users who participated in events on 5th May, 2016 at the coordinates of (112,44).
Evidence: models refers to device_model; on 5th May, 2016 refers to timestamp LIKE '2016-05-05%'; coordinates of (112,44) refers to longitude = 112 AND latitude = 44;
SQL: SELECT DISTINCT T2.phone_brand, T2.device_model FROM events AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T2.device_id = T1.device_id WHERE T1.timestamp LIKE '2016-05-05%' AND T1.longitude = 112 AND T1.latitude = 44
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: Provide the app users IDs and time for the event ID of 82.
Evidence: app user IDs refers to app_id; time refers to timestamp;
SQL: SELECT T1.app_id, T2.timestamp FROM app_events AS T1 INNER JOIN events AS T2 ON T2.event_id = T1.event_id WHERE T2.event_id = 82
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: Describe the device user gender and age of the event ID of 15251.
SQL: SELECT T1.gender, T1.age FROM gender_age AS T1 INNER JOIN events AS T2 ON T2.device_id = T1.device_id WHERE T2.event_id = 15251
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: How many events did the 88-years-old male users participate on 4th May,2016?
Evidence: 88-years-old refers to age = 88; male refers to gender = 'M'; on 4th May, 2016 refers to timestamp LIKE '2016-05-04%';
SQL: SELECT COUNT(T2.event_id) FROM gender_age AS T1 INNER JOIN events AS T2 ON T2.device_id = T1.device_id WHERE T1.gender = 'M' AND SUBSTR(`timestamp`, 1, 10) = '2016-05-04' AND T1.age = 88
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: Describe the ages, genders and numbers of events participated by the users at coordinates of (-102,38).
Evidence: coordinates of (-102,38) refers to longitude = -102, latitude = 38;
SQL: SELECT DISTINCT T1.age, T1.gender, COUNT(T2.event_id) FROM gender_age AS T1 INNER JOIN `events` AS T2 ON T2.device_id = T1.device_id WHERE T2.longitude = -102 AND T2.latitude = 38 GROUP BY T1.age, T1.gender, T2.longitude, T2.latitude
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: Provide the phone brands and models of the users who were at the coordinates of (80,44).
Evidence: models refers to device_model; coordinates of (80,44) refers to longitude = 80 AND latitude = 44;
SQL: SELECT DISTINCT T1.phone_brand, T1.device_model FROM phone_brand_device_model2 AS T1 INNER JOIN events AS T2 ON T2.device_id = T1.device_id WHERE T2.longitude = 80 AND T2.latitude = 44
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: List the included categories in the event ID of 155.
SQL: SELECT DISTINCT T1.category FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T2.label_id = T1.label_id INNER JOIN app_events AS T3 ON T3.app_id = T2.app_id WHERE T3.event_id = 155
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: Among HTC Butterfly phone users, list any five devices' IDs used by females.
Evidence: HTC Butterfly refers to phone_brand = 'HTC' AND device_model = 'Butterfly'; females refers to gender = 'F';
SQL: SELECT T2.device_id FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T1.device_model = 'Butterfly' AND T2.gender = 'F' AND T1.phone_brand = 'HTC' LIMIT 5
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: How many app IDs were included under science fiction category?
SQL: SELECT COUNT(T2.app_id) FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T2.label_id = T1.label_id WHERE T1.category = 'science fiction'
Database: talkingdata
Tables: app_all, app_events, app_events_relevant, app_labels, events, events_relevant, gender_age, gender_age_test, gender_age_train, label_categories, phone_brand_device_model2, sample_submission
Columns (table index, column name): -1, *, 0, app_id, 1, event_id, 1, app_id, 1, is_installed, 1, is_active, 2, event_id, 2, app_id, 2, is_installed, 2, is_active, 3, app_id, 3, label_id, 4, event_id, 4, device_id, 4, timestamp, 4, longitude, 4, latitude, 5, event_id, 5, device_id, 5, timestamp, 5, longitude, 5, latitude, 6, device_id, 6, gender, 6, age, 6, group, 7, device_id, 8, device_id, 8, gender, 8, age, 8, group, 9, label_id, 9, category, 10, device_id, 10, phone_brand, 10, device_model, 11, device_id, 11, F23-, 11, F24-26, 11, F27-28, 11, F29-32, 11, F33-42, 11, F43+, 11, M22-, 11, M23-26, 11, M27-28, 11, M29-31, 11, M32-38, 11, M39+
Question: What are the ages and genders of the LG L70 users?
Evidence: LG L70 refers to phone_brand = 'LG' AND device_model = 'L70';
SQL: SELECT T2.age, T2.gender FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T1.phone_brand = 'LG' AND T1.device_model = 'L70'