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: How many events in total have happened on all the vivo devices in the year 2016?
Evidence: vivo devices refers to phone_brand = 'vivo'; in the year 2016 refers to year(timestamp) = 2016;
SQL: SELECT COUNT(T1.event_id) FROM events AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.event_id = T2.device_id WHERE STRFTIME('%Y', T1.timestamp) = '2016' AND T2.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: Among the users who uses a vivo device, how many of them are female and under 30?
Evidence: vivo device refers to phone_brand = 'vivo'; female refers to gender = 'F'; under 30 refers to age < 30;
SQL: SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'F' AND T2.phone_brand = 'vivo' AND T1.age < 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: What is the category that the most app users belong to?
Evidence: most app users refers to MAX(COUNT(app_id));
SQL: SELECT T.category FROM ( SELECT T1.category, COUNT(T2.app_id) AS num FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id GROUP BY T1.label_id ) 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: What is the brand of the device used by the youngest female user?
Evidence: brand of the device refers to phone_brand; youngest refers to MIN(age); female refers to gender = 'F';
SQL: SELECT phone_brand FROM phone_brand_device_model2 WHERE device_id IN ( SELECT * FROM ( SELECT device_id FROM gender_age WHERE gender = 'F' ORDER BY age LIMIT 1 ) AS T )
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 in user group M23-26 use a vivo device?
Evidence: user group M23-26 refers to group = 'M23-26'; vivo device refers to phone_brand = 'vivo';
SQL: SELECT COUNT(T2.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.`group` = 'M23-26' AND T2.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: Among all the users who use a vivo device, what is the percentage of the users in the M23-26 user group?
Evidence: vivo device refers to phone_brand = 'vivo'; percentage = MULTIPLY(DIVIDE(COUNT(phone_brand = 'vivo WHERE group = 'M23-26), COUNT(phone_brand = 'vivo)), 100); M23-26 user group refers to group = 'M23-26';
SQL: SELECT SUM(IIF(T1.`group` = 'M23-26', 1.0, 0)) / COUNT(T1.device_id) AS per FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.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: Among all the devices with event no.2 happening, what is the percentage of the device being a vivo phone?
Evidence: event no. refers to event_id; event_id = '2'; percentage = SUM(IF(phone_brand = 'vivo',1,0)), COUNT(device_id) WHERE event_id = '2'; vivo phone refers to phone_brand = 'vivo';
SQL: SELECT SUM(IIF(T2.phone_brand = 'vivo', 1, 0)) / COUNT(T1.device_id) AS per FROM events AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.event_id = T2.device_id WHERE T1.event_id = '2'
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 average age of all the vivo device users?
Evidence: average age = AVG(age); vivo device refers to phone_brand = 'vivo';
SQL: SELECT AVG(age) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.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: How many female users belong to the age group of 27 to 28?
Evidence: female refers to gender = 'F'; age group of 27 to 28 refers to `group` = 'F27-28';
SQL: SELECT COUNT(device_id) FROM gender_age WHERE `group` = 'F27-28' AND gender = 'F'
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 age of the oldest male user of the app?
Evidence: oldest user refers to MAX(age); male refers to gender = 'M';
SQL: SELECT MAX(age) FROM gender_age WHERE gender = 'M'
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 installed the app but are not active?
Evidence: installed refers to is_installed = 1; not active refers to is_active = 0;
SQL: SELECT COUNT(app_id) FROM app_events WHERE is_installed = 1 AND is_active = 0
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 age of the youngest female user of the app?
Evidence: youngest user refers to MIN(age); female refers to gender = 'F';
SQL: SELECT MIN(age) FROM gender_age WHERE gender = 'F'
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 models does the VIVO phone brand released?
Evidence: models refers to device_model;
SQL: SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE 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: List at least 15 phone models released under the OPPO brand.
Evidence: phone models refers to device_model; OPPO brand refers to phone_brand = 'OPPO';
SQL: SELECT device_model FROM phone_brand_device_model2 WHERE phone_brand = 'OPPO' LIMIT 15
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 at least 10 device models that male users over the age of 39 usually use.
Evidence: male refers to gender = 'M'; over the age of 39 refers to group = 'M39+';
SQL: SELECT T1.device_model FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T1.device_id = T2.device_id WHERE T2.`group` = 'M39+' AND T2.gender = 'M' LIMIT 10
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 5 device models that users use to install the app and are active in using the app.
Evidence: install refers to is_installed = 1; active refers to is_active = 1;
SQL: SELECT T1.device_model FROM phone_brand_device_model2 AS T1 INNER JOIN events AS T2 ON T1.device_id = T2.event_id INNER JOIN app_events AS T3 ON T2.event_id = T3.event_id WHERE T3.is_active = 1 AND T3.is_installed = 1 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 users belong to "Financial Information" category?
SQL: SELECT COUNT(T1.app_id) FROM app_labels AS T1 INNER JOIN label_categories AS T2 ON T1.label_id = T2.label_id WHERE T2.category = 'Financial Information'
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 "game-Art Style" category?
SQL: SELECT COUNT(T1.app_id) FROM app_labels AS T1 INNER JOIN label_categories AS T2 ON T1.label_id = T2.label_id WHERE T2.category = 'game-Art Style'
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 total number of the male users that use OPPO as their phone brand.
Evidence: male refers to gender = 'Male';
SQL: SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'OPPO' AND T1.gender = 'M'
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 brand of the youngest user's device?
Evidence: brand of the device refers to phone_brand; youngest user refers to MIN(age);
SQL: SELECT device_model FROM phone_brand_device_model2 WHERE device_id IN ( SELECT device_id FROM gender_age WHERE age = ( SELECT MIN(age) FROM gender_age ) )