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: List at least 3 categories with the lowest number of users.
Evidence: lowest number of users refers to MIN(COUNT(label_id));
SQL: SELECT T1.category FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id ORDER BY T2.label_id LIMIT 3
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 male users use the Galaxy Ace Plus model?
Evidence: male refers to gender = 'M'; Galaxy Ace Plus refers to device_model = 'Galaxy Ace Plus';
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.device_model = 'Galaxy Ace Plus' 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 age group of most OPPO users?
Evidence: age group refers to group; most OPPO users refers to MAX(COUNT(phone_brand = 'OPPO')); OPPO users refers to phone_brand = 'OPPO';
SQL: SELECT T.`group` FROM ( SELECT T1.`group`, COUNT(T1.`group`) AS num 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' GROUP BY T1.`group` ) 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: List at least 5 device models that are commonly used by female users.
Evidence: device models that are commonly used refers to MAX(COUNT(device_model)); female refers to gender = 'F';
SQL: SELECT T.device_model FROM ( SELECT T2.device_model, COUNT(T2.device_model) AS num FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'F' GROUP BY T2.device_model ) AS T ORDER BY T.num DESC 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: Calculate the ratio in percentage between the average number of app users belonging to "80s Japanese comic" and "90s Japanese comic".
Evidence: ratio in percentage = DIVIDE(SUM(IF(category = '80s Japanese comic',1,0)), COUNT(app_id)) as '80s'; DIVIDE(SUM(IF(category = '90s Japanese comic',1,0)), COUNT(app_id)) as '90s'; 80s Japanese comic refers to category = '80s Japanese comic'; 90s Japanese comic refers to category = '80s Japanese comic';
SQL: SELECT SUM(IIF(T1.category = '80s Japanese comic', 1, 0)) / COUNT(T1.label_id) AS J8 , SUM(IIF(T1.category = '90s Japanese comic', 1, 0)) / COUNT(T1.label_id) AS J9 FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id
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 female users that uses OPPO as their phone brand, what is the percentage of them of the user that uses R815T model to install the app?
Evidence: female refers to gender = 'F'; percentage = DIVIDE(SUM(IF(phone_brand = 'OPPO',1,0)), SUM(IF(device_id = 'R815T',1,0))); R815T refers to device_id = 'R815T';
SQL: SELECT SUM(IIF(T1.phone_brand = 'OPPO', 1, 0)) / SUM(IIF(T1.device_id = 'R815T', 1, 0)) AS num FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T1.device_id = T2.device_id WHERE T2.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 phone brand of the device model "坚果手机"?
SQL: SELECT phone_brand FROM phone_brand_device_model2 WHERE device_model = '坚果手机'
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: Give the number of device models for "中兴" phone brand.
SQL: SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE device_model = '中兴'
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 group does age 24 belong to?
SQL: SELECT `group` FROM gender_age WHERE age = '24'
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: Give the time stamp for event No.887711.
Evidence: event no. refers to event_id; event_id = '887711';
SQL: SELECT timestamp FROM events WHERE event_id = '887711'
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 number of events that happened on 2016/5/6.
Evidence: on 2016/5/6 refers to timestamp = '2016/5/6 XX:XX:XX';
SQL: SELECT COUNT(event_id) FROM events WHERE SUBSTR(`timestamp`, 1, 10) = '2016-05-06'
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: For the event which happened at 23:55:16 on 2016/5/7, in the location coordinate(113, 28), on what device did it happen? Give the name of the device model.
Evidence: at 23:55:16 on 2016/5/7 refers to timestamp = '2016/5/7 23:55:16'; location coordinate (113, 28) refers to longitude = '113' AND latitude = '28';
SQL: SELECT T1.device_model FROM phone_brand_device_model2 AS T1 INNER JOIN events AS T2 ON T1.device_id = T2.event_id WHERE T2.longitude = '113' AND T2.latitude = '28' AND T2.timestamp = '2016-05-07 23:55:16'
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: Give the number of "game-Fishing" apps.
Evidence: game-Fishing refers to category = 'game-Fishing';
SQL: SELECT COUNT(T2.app_id) FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T1.category = 'game-Fishing'
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: State the number of the "魅蓝Note 2" users who are in the "F29-32" group.
Evidence: 魅蓝Note 2 refers to device_model = '魅蓝Note 2';
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` = 'F29-32' AND T2.device_model = '魅蓝Note 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: Give the number of 30-year-old users who were active in the events on 2016/5/2.
Evidence: 30-year-old refers to age = '30'; active refers to is_active = 1; on 2016/5/2 refers to timestamp = '2016/5/2 XX:XX:XX';
SQL: SELECT COUNT(T3.device_id) FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id INNER JOIN gender_age AS T3 ON T2.device_id = T3.device_id WHERE SUBSTR(`timestamp`, 1, 10) = '2016-05-02' AND T1.is_active = 1 AND T3.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: For the event which happened at 23:33:34 on 2016/5/6, how many installed apps were involved?
Evidence: at 23:33:34 on 2016/5/6 refers to timestamp = '2016/5/6 23:33:34'; installed refers to is_installed = '1';
SQL: SELECT COUNT(T1.event_id) FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id WHERE SUBSTR(T2.`timestamp`, 1, 10) = '2016-05-06' AND T1.is_installed = '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: Give the number of female users of "E派" brand devices.
Evidence: female refers to gender = 'F'; E派 brand refers to phone_brand = 'E派';
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.gender = 'F' AND T2.phone_brand = 'E派'
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 male users of the "Galaxy S5" device model?
Evidence: male refers to gender = 'M';
SQL: SELECT COUNT(T1.device_id) FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T1.device_id = T2.device_id WHERE T1.device_model = 'Galaxy S5' AND T2.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 from the group "F29-32" who were active in the events on 2016/5/7?
Evidence: active users refers to is_active = '1'; on 2016/5/7 refers to timestamp = '2016/5/7 XX:XX:XX';
SQL: SELECT COUNT(T1.app_id) FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id INNER JOIN gender_age AS T3 ON T2.event_id = T3.device_id WHERE SUBSTR(T2.`timestamp`, 1, 10) = '2016-05-07' AND T1.is_active = '1' AND T3.`group` = 'F29-32'
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 does the app id No.894384172610331000 belong to?
SQL: SELECT T1.category FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T2.app_id = '894384172610331000'