Chinastark/bird_dataset huggingface dataset:
Database: talkingdata
Note: male refers to gender = 'M';
Question: How many male users of the "Galaxy S5" device model?
SQL: SELECT count(phone_brand_device_model2.device_id) FROM phone_brand_device_model2 INNER JOIN gender_age ON phone_brand_device_model2.device_id = gender_age.device_id WHERE phone_brand_device_model2.device_model = 'Galaxy S5' AND gender_age.gender = 'M'
Database: talkingdata
Note: active users refers to is_active = '1'; on 2016/5/7 refers to timestamp = '2016/5/7 XX:XX:XX';
Question: How many users from the group "F29-32" who were active in the events on 2016/5/7?
SQL: SELECT count(app_events.app_id) FROM app_events INNER JOIN EVENTS ON app_events.event_id = EVENTS.event_id INNER JOIN gender_age ON EVENTS.event_id = gender_age.device_id WHERE substr(EVENTS.`timestamp`, 1, 10) = '2016-05-07' AND app_events.is_active = '1' AND gender_age.`group` = 'F29-32'
Database: talkingdata
Question: Which category does the app id No.894384172610331000 belong to?
SQL: SELECT label_categories.category FROM label_categories INNER JOIN app_labels ON label_categories.label_id = app_labels.label_id WHERE app_labels.app_id = '894384172610331000'
Database: talkingdata
Note: at 14:09:49 on 2016/5/6 refers to timestamp = '2016/5/6 14:09:49'; location coordinate(116, 40) refers to longitude = '116' AND latitude = '40'; active refers to is_active = '1';
Question: For the event which happened at 14:09:49 on 2016/5/6, in the location coordinate(116, 40), how many apps were active?
SQL: SELECT count(app_events.app_id) FROM app_events INNER JOIN EVENTS ON app_events.event_id = EVENTS.event_id WHERE EVENTS.timestamp = '2016-05-06 14:09:49' AND app_events.is_active = '1' AND EVENTS.longitude = '116' AND EVENTS.latitude = '40'
Database: talkingdata
Note: how many times = DIVIDE(SUM(IF(timestamp = '2016/5/2 7:50:28', 1,0)), SUM(IF(timestamp = '2016/5/2 7:41:03',1,0))); active refers to is_active = '1'; at 7:50:28 on 2016/5/2 refers to timestamp = '2016/5/2 7:50:28'; at 7:41:03 on 2016/5/2 refers to timestamp = '2016/5/2 7:41:03';
Question: How many times is the number of active apps in the event that happened at 7:50:28 on 2016/5/2 than in the event that happened at 7:41:03 on 2016/5/2?
SQL: SELECT sum(iif(TIMESTAMP = '2016-05-02 7:50:28', 1, 0)) / sum(iif(TIMESTAMP = '2016-05-02 7:41:03', 1, 0)) AS num FROM EVENTS INNER JOIN app_events ON EVENTS.event_id = app_events.event_id WHERE app_events.is_active = '1'
Database: talkingdata
Note: brand vivo refers to phone_brand = 'vivo';
Question: How many devices are of the brand vivo?
SQL: SELECT count(device_id) FROM phone_brand_device_model2 WHERE phone_brand = 'vivo'
Database: talkingdata
Note: how many more = SUBTRACT(SUM(IF(phone_brand = 'vivo',1,0)), SUM(IF(phone_brand = 'LG',1,0))); brand vivo refers to phone_brand = 'vivo'; brand LG refers to phone_brand = 'LG';
Question: How many more devices are there of the brand vivo than of the brand LG?
SQL: SELECT sum(iif(phone_brand = 'vivo', 1, 0)) - sum(iif(phone_brand = 'LG', 1, 0)) AS num FROM phone_brand_device_model2
Database: talkingdata
Note: ID of the device refers to device_id; youngest user refers to MIN(age);
Question: What is the ID of the device used by the youngest user?
SQL: SELECT device_id FROM gender_age WHERE age = ( SELECT min(age) FROM gender_age )
Database: talkingdata
Note: female refers to gender = 'F'; over 30 refers to age > 30;
Question: Among the female users of the devices, how many of them are over 30?
SQL: SELECT count(device_id) FROM gender_age WHERE age > 30 AND gender = 'F'
Database: talkingdata
Note: MAX(age) AND gender = 'M' means that the oldest device user is male; MAX(age) AND gender = 'F' means that the oldest device user is female;
Question: Is the oldest device user male or female?
SQL: SELECT gender FROM gender_age WHERE age = ( SELECT max(age) FROM gender_age )
Database: talkingdata
Note: youngest refers to MIN(age); female refers to gender = 'F';
Question: What is the age of the youngest female device user?
SQL: SELECT min(age) FROM gender_age WHERE gender = 'F'
Database: talkingdata
Note: vivo device refers to phone_brand = 'vivo'; youngest refers to MIN(age);
Question: Among all the users who use a vivo device, what is the age of the youngest user?
SQL: SELECT gender_age.age FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE phone_brand_device_model2.phone_brand = 'vivo' ORDER BY gender_age.age LIMIT 1
Database: talkingdata
Question: Please list the app IDs of all the users in the Securities category.
SQL: SELECT app_labels.app_id FROM label_categories INNER JOIN app_labels ON label_categories.label_id = app_labels.label_id WHERE label_categories.category = 'Securities'
Database: talkingdata
Note: on 2016/5/1 at 0:55:25 refers to timestamp = '2016-05-01 00:55:25';
Question: For the device with an event occurring on 2016/5/1 at 0:55:25, what is the gender of its user?
SQL: SELECT gender_age.gender FROM gender_age INNER JOIN EVENTS ON gender_age.device_id = EVENTS.device_id WHERE EVENTS.timestamp = '2016-05-01 00:55:25'
Database: talkingdata
Note: in 2016 refers to year(timestamp) = 2016; m23-26 user group refers to `group` = 'm23-26';
Question: Among the devices with an event occurring in 2016, how many of them are owned by a user in the M23-26 user group?
SQL: SELECT count(gender_age.device_id) FROM gender_age INNER JOIN EVENTS ON gender_age.device_id = EVENTS.device_id WHERE strftime('%Y', EVENTS.timestamp) = '2016' AND gender_age.`group` = 'M23-26'
Database: talkingdata
Note: brand of the device refers to phone_brand; m23-26 user group refers to `group` = 'm23-26';
Question: What is the brand of the device used by the most users in the M23-26 user group?
SQL: SELECT t.phone_brand FROM ( SELECT phone_brand_device_model2.phone_brand, count(gender_age.device_id) AS num FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE gender_age.`group` = 'M23-26' GROUP BY phone_brand_device_model2.phone_brand ) AS t ORDER BY t.num DESC LIMIT 1
Database: talkingdata
Note: location coordinates = longitude, latitude; Galaxy Note 2 refers to device_model = 'Galaxy Note 2';
Question: Please list the location coordinates of all the Galaxy Note 2 devices when an event happened.
SQL: SELECT EVENTS.longitude, EVENTS.latitude FROM EVENTS INNER JOIN phone_brand_device_model2 ON EVENTS.device_id = phone_brand_device_model2.device_id WHERE phone_brand_device_model2.device_model = 'Galaxy Note 2'
Database: talkingdata
Note: models of the devices refers to device_model; female refers to gender = 'F';
Question: Please list all the models of the devices used by a female user.
SQL: SELECT phone_brand_device_model2.device_model FROM phone_brand_device_model2 INNER JOIN gender_age ON phone_brand_device_model2.device_id = gender_age.device_id WHERE gender_age.gender = 'F'
Database: talkingdata
Note: app user ID refers to app_id; app_id = 7324884708820020000;
Question: What are the categories that app user ID7324884708820020000 belongs to?
SQL: SELECT label_categories.category FROM label_categories INNER JOIN app_labels ON label_categories.label_id = app_labels.label_id WHERE app_labels.app_id = 7324884708820020000
Database: talkingdata
Note: not active refers to is_active = 0; event no. refers to event_id; event_id = 2;
Question: Among the app users who were not active when event no.2 happened, how many of them belong to the category Property Industry 1.0?
SQL: SELECT count(app_labels.app_id) FROM label_categories INNER JOIN app_labels ON label_categories.label_id = app_labels.label_id INNER JOIN app_events ON app_labels.app_id = app_events.app_id WHERE app_events.is_active = 0 AND label_categories.category = 'Property Industry 1.0' AND app_events.event_id = 2
Database: talkingdata
Note: not active refers to is_active = 0; event no. refers to event_id; event_id = 2;
Question: How many categories in total do the app users who were not active when event no.2 happened belong to?
SQL: SELECT count(*) FROM ( SELECT count(DISTINCT label_categories.category) AS RESULT FROM label_categories INNER JOIN app_labels ON label_categories.label_id = app_labels.label_id INNER JOIN app_events ON app_labels.app_id = app_events.app_id WHERE app_events.event_id = 2 AND app_events.is_active = 0 GROUP BY label_categories.category ) t
Database: talkingdata
Note: female users refers to gender = 'F'; most female users refers to MAX(COUNT(gender = 'F')); over 30 refers to age > 30;
Question: What is the device model used by the most female users over 30?
SQL: SELECT t.device_model FROM ( SELECT phone_brand_device_model2.device_model, count(phone_brand_device_model2.device_model) AS num FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE gender_age.age > 30 AND gender_age.gender = 'F' GROUP BY phone_brand_device_model2.device_model ) AS t ORDER BY t.num DESC LIMIT 1
Database: talkingdata
Note: models of the devices refers to device_model; location coordinates (121, 31) refers to longitude = 121 AND latitude = 31;
Question: Please list the models of all the devices with an event under the location coordinates (121, 31).
SQL: SELECT phone_brand_device_model2.device_model FROM EVENTS INNER JOIN phone_brand_device_model2 ON EVENTS.device_id = phone_brand_device_model2.device_id WHERE EVENTS.longitude = 121 AND EVENTS.latitude = 31
Database: talkingdata
Note: most app users refers to MAX(COUNT(app_id));
Question: What are the top 3 categories with the most app users?
SQL: SELECT t.category FROM ( SELECT label_categories.category, count(app_labels.app_id) AS num FROM app_labels INNER JOIN label_categories ON app_labels.label_id = label_categories.label_id GROUP BY label_categories.category ) AS t ORDER BY t.num DESC LIMIT 3
Database: talkingdata
Note: oldest user refers to MAX(age);
Question: Please list the event IDs of the events that have happened on the device of the oldest user.
SQL: SELECT EVENTS.event_id FROM gender_age INNER JOIN EVENTS ON gender_age.device_id = EVENTS.device_id ORDER BY gender_age.age DESC LIMIT 1
Database: talkingdata
Note: youngest refers to MIN(age); female refers to gender = 'F';
Question: How many events have happened on the device of the youngest female user?
SQL: SELECT count(EVENTS.event_id) FROM EVENTS INNER JOIN gender_age ON EVENTS.device_id = gender_age.device_id WHERE gender_age.gender = 'F' GROUP BY EVENTS.event_id, gender_age.age ORDER BY gender_age.age LIMIT 1
Database: talkingdata
Note: on 2016/5/1 refers to timestamp = '2016-05-01'; male refers to gender = 'M';
Question: Among the devices on which an event happened on 2016/5/1, how many of them are used by a male user?
SQL: SELECT count(EVENTS.device_id) FROM EVENTS INNER JOIN gender_age ON EVENTS.device_id = gender_age.device_id WHERE EVENTS.timestamp = '2016-05-01' AND gender_age.gender = 'M'
Database: talkingdata
Note: more app users refers to SUBTRACT(IF(SUM(category = 'Securities'), SUM(category = 'Finance')) > 0,'Securities','Finance') as more;
Question: Which category has more app users, Securities or Finance?
SQL: SELECT iif(sum(iif(label_categories.category = 'Securities', 1, 0)) - sum(iif(label_categories.category = 'Finance', 1, 0)) > 0, 'Securities', 'Finance') AS diff FROM app_labels INNER JOIN label_categories ON app_labels.label_id = label_categories.label_id
Database: talkingdata
Note: m23-26 user group refers to `group` = 'm23-26';
Question: Please list the device models of all the devices used by a user in the M23-26 user group.
SQL: SELECT phone_brand_device_model2.device_model FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE gender_age.`group` = 'M23-26'
Database: talkingdata
Note: average age = AVG(age); female refers to gender = 'F'; vivo device refers to phone_brand = 'vivo';
Question: What is the average age of the female users who uses a vivo device?
SQL: SELECT avg(gender_age.age) FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE phone_brand_device_model2.phone_brand = 'vivo' AND gender_age.gender = 'F'
Database: talkingdata
Note: ratio = DIVIDE(SUM(gender = 'M' WHERE phone_brand = 'vivo'), SUM(gender = 'F' WHERE phone_brand = 'vivo')); female refers to gender = 'F'; male refers to gender = 'M'; vivo device refers to phone_brand = 'vivo';
Question: What is the ratio of female users to male users who uses a vivo device?
SQL: SELECT sum(iif(gender_age.gender = 'M', 1, 0)) / sum(iif(gender_age.gender = 'F', 1, 0)) AS per FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE phone_brand_device_model2.phone_brand = 'vivo'
Database: talkingdata
Note: ratio = DIVIDE(SUM(category = 'Securities'), SUM(category = 'Finance'));
Question: What is the ratio of the number of app users that belong to the Securities category to the number of app users that belong to the Finance category?
SQL: SELECT sum(iif(label_categories.category = 'Securities', 1, 0)) / sum(iif(label_categories.category = 'Finance', 1, 0)) AS per FROM app_labels INNER JOIN label_categories ON app_labels.label_id = label_categories.label_id
Database: talkingdata
Question: What is the label ID of "Third-party card management" category?
SQL: SELECT label_id FROM label_categories WHERE category = 'Third-party card management'
Database: talkingdata
Note: ratio = DIVIDE(SUM(is_active = 1), SUM(is_active = 0)); active refers to is_active = 1; inactive refers to is_active = 0;
Question: What is the ratio of active and inactive app users of the event ID "58"?
SQL: SELECT sum(iif(is_active = 1, 1, 0)) / sum(iif(is_active = 0, 1, 0)) AS per FROM app_events WHERE event_id = 58
Database: talkingdata
Question: How many events did the device ID "3915082290673130000" join?
SQL: SELECT count(event_id) FROM EVENTS WHERE device_id = 3915082290673130000
Database: talkingdata
Note: percentage = DVIDE(SUM(gender = 'M'), COUNT(device_id)); male refers to gender = 'M';
Question: Calculate the percentage of male users among all device users.
SQL: SELECT sum(iif(gender = 'M', 1, 0)) / count(device_id) AS per FROM gender_age
Database: talkingdata
Question: How many events were participated by the users at longitude of "-156"?
SQL: SELECT count(event_id) FROM EVENTS WHERE longitude = -156
Database: talkingdata
Question: How many app users belong to label ID of "48"?
SQL: SELECT count(app_id) FROM app_labels WHERE label_id = 48
Database: talkingdata
Note: category names refers to category; start with the word game refers to category like 'game%';
Question: How many category names start with the word "game"?
SQL: SELECT count(label_id) FROM label_categories WHERE category LIKE 'game%'
Database: talkingdata
Note: coordinates of (80,37) refers to longitude = 80 and latitude = 37;
Question: Provide the number of events participated by the device users at coordinates of (80,37).
SQL: SELECT count(event_id) FROM EVENTS WHERE longitude = 80 AND latitude = 37
Database: talkingdata
Question: List down the labels' IDs and categories of the app ID "5758400314709850000".
SQL: SELECT app_labels.label_id, label_categories.category FROM app_labels INNER JOIN label_categories ON app_labels.label_id = label_categories.label_id WHERE app_labels.app_id = 5758400314709850000
Database: talkingdata
Question: List down the app IDs under the category of game-Rowing .
SQL: SELECT app_labels.app_id FROM label_categories INNER JOIN app_labels ON label_categories.label_id = app_labels.label_id WHERE label_categories.category = 'game-Rowing'
Database: talkingdata
Question: What are the label IDs and app IDs of the Chinese Classical Mythology category?
SQL: SELECT label_categories.label_id, app_labels.app_id FROM label_categories INNER JOIN app_labels ON label_categories.label_id = app_labels.label_id WHERE label_categories.category = 'Chinese Classical Mythology'
Database: talkingdata
Note: location = longitude, latitude;
Question: Describe the number of app IDs and location of the event ID "79641".
SQL: SELECT count(app_events.app_id), EVENTS.longitude, EVENTS.latitude FROM app_events INNER JOIN EVENTS ON app_events.event_id = EVENTS.event_id WHERE app_events.event_id = 79641 GROUP BY EVENTS.longitude, EVENTS.latitude
Database: talkingdata
Note: locations = longitude, latitude; times of the events refers to timestamp;
Question: Provide the locations and times of the events of app ID "8715964299802120000".
SQL: SELECT EVENTS.longitude, EVENTS.latitude, EVENTS.timestamp FROM EVENTS INNER JOIN app_events ON EVENTS.event_id = app_events.event_id WHERE app_events.app_id = 8715964299802120000
Database: talkingdata
Note: OPPO refers to phone_brand = 'OPPO'; around 12 AM on 1st May, 2016 refers to timestamp is '2016-05-01';
Question: How many OPPO users participated in events which were held around 12 AM on 1st May,2016?
SQL: SELECT count(EVENTS.device_id) FROM EVENTS INNER JOIN phone_brand_device_model2 ON EVENTS.device_id = phone_brand_device_model2.device_id WHERE phone_brand_device_model2.phone_brand = 'OPPO' AND strftime('%Y-%m-%d', EVENTS.`timestamp`) = '2016-05-01'
Database: talkingdata
Note: ratio = DIVIDE(SUM(gender = 'M' WHERE device_model = 'X5Pro'), SUM(gender = 'F' WHERE device_model = 'X5Pro')); male refers to gender = 'M'; female refers to gender = 'F'; vivo X5pro model refers to phone_brand = 'vivo' AND device_model = 'X5Pro';
Question: What is the ratio of male and female users of vivo X5pro model?
SQL: SELECT sum(iif(gender_age.gender = 'M', 1, 0)) / sum(iif(gender_age.gender = 'F', 1, 0)) AS per FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE phone_brand_device_model2.phone_brand = 'vivo' AND phone_brand_device_model2.device_model = 'X5Pro'
Database: talkingdata
Note: females refers to gender = 'F'; ZUK Z1 refers to phone_brand = 'ZUK' AND device_model = 'Z1'; under 23 refers to `group` = 'f23-' ;
Question: How many females use ZUK Z1 phones in the age group under 23?
SQL: SELECT count(gender_age.device_id) FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE gender_age.gender = 'F' AND phone_brand_device_model2.device_model = 'Z1' AND gender_age.`group` = 'F23-' AND phone_brand_device_model2.phone_brand = 'ZUK'
Database: talkingdata
Note: models refers to device_model; under 10 years of age refers to age < 10;
Question: List the phone brands and models of the users under 10 years of age.
SQL: SELECT phone_brand_device_model2.phone_brand, phone_brand_device_model2.device_model FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE gender_age.age < 10
Database: talkingdata
Note: HTC refers to phone_brand = 'HTC'; percentage = DIVIDE(SUM(gender = 'F' AND age > 80), COUNT(device_id)); female refers to gender = 'F'; over 80 refers to age > 80;
Question: Among the HTC users, calculate the percentage of female users who are over 80.
SQL: SELECT sum(iif(gender_age.gender = 'F' AND gender_age.age > 80, 1, 0)) / count(gender_age.device_id) AS per FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE phone_brand_device_model2.phone_brand = 'HTC'
Database: talkingdata
Note: model refers to device_model;
Question: Which phone brand and model was used for event ID "6701"?
SQL: SELECT phone_brand_device_model2.phone_brand, phone_brand_device_model2.device_model FROM EVENTS INNER JOIN phone_brand_device_model2 ON EVENTS.device_id = phone_brand_device_model2.device_id WHERE EVENTS.event_id = 6701
Database: talkingdata
Note: more events refers to MAX(COUNT(event_id));
Question: Between device ID of "-9215352913819630000" and "-9222956879900150000", mention the age and gender of device user who participated more events.
SQL: SELECT t.age, t.gender FROM ( SELECT gender_age.age, gender_age.gender, count(EVENTS.device_id) AS num FROM EVENTS INNER JOIN gender_age ON EVENTS.device_id = gender_age.device_id WHERE EVENTS.device_id BETWEEN -9215352913819630000 AND -9222956879900150000 GROUP BY gender_age.age, gender_age.gender ) AS t ORDER BY t.num DESC LIMIT 1
Database: talkingdata
Note: time refers to timestamp;
Question: List out the time of the event id 12.
SQL: SELECT TIMESTAMP FROM EVENTS WHERE event_id = 12
Database: talkingdata
Note: active refers to is_active = 1;
Question: How many active users are there in the event?
SQL: SELECT count(app_id) FROM app_events WHERE is_active = 1
Database: talkingdata
Note: model refers to device_model; device_model = 'A51';
Question: How many devices belong to model "A51"?
SQL: SELECT count(device_id) FROM phone_brand_device_model2 WHERE device_model = 'A51'
Database: talkingdata
Note: device refers to device_id; device_id = -9222956879900150000;
Question: State the gender of users who use the device "-9222956879900150000".
SQL: SELECT gender FROM gender_age WHERE device_id = -9222956879900150000
Database: talkingdata
Note: labels refers to label_id;
Question: How many labels belong to the game-card category?
SQL: SELECT count(label_id) FROM label_categories WHERE category = 'game-card'
Database: talkingdata
Note: age group refers to group;
Question: What is the age group of users who use phone brand of vivo?
SQL: SELECT gender_age.`group` FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE phone_brand_device_model2.phone_brand = 'vivo'
Database: talkingdata
Note: under 30 refers to age < 30;
Question: How many users who are under 30 years old use device model of Galaxy Note 2?
SQL: SELECT count(gender_age.device_id) FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE phone_brand_device_model2.device_model = 'Galaxy Note 2' AND gender_age.age < 30
Database: talkingdata
Note: OPPO refers to phone_brand = 'OPPO'; percentage = MULTIPLY(DIVIDE(SUM(age < 50), COUNT(device_id)), 1.0); under 50 years old refers to age < 50;
Question: Among the users who use OPPO, calculate the percentage of those who are under 50 years old.
SQL: SELECT sum(iif(gender_age.age < 50, 1, 0)) / count(gender_age.device_id) AS per FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE phone_brand_device_model2.phone_brand = 'OPPO'
Database: talkingdata
Note: average age = AVG(age);
Question: What is the average age of the users who use model device of R7?
SQL: SELECT sum(gender_age.age) / count(gender_age.device_id) AS AVG FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE phone_brand_device_model2.device_model = 'R7'
Database: talkingdata
Note: label that represented the behavior category refers to label_id;
Question: What is the category of the label that represented the behavior category of app id 5902120154267990000?
SQL: SELECT label_categories.category FROM label_categories INNER JOIN app_labels ON label_categories.label_id = app_labels.label_id WHERE app_labels.app_id = 5902120154267990000
Database: talkingdata
Note: group of age refers to group;
Question: Mention the group of age of users who use phone brand of LG.
SQL: SELECT gender_age.`group` FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE phone_brand_device_model2.phone_brand = 'LG'
Database: talkingdata
Note: label that represented the behavior category refers to label_id;
Question: State the category of the label that represented the behavior category of app id 4955831798976240000.
SQL: SELECT label_categories.category FROM label_categories INNER JOIN app_labels ON label_categories.label_id = app_labels.label_id WHERE app_labels.app_id = 4955831798976240000
Database: talkingdata
Note: female refers to gender = 'F';
Question: How many female users use device model of MI 3?
SQL: SELECT count(gender_age.device_id) FROM gender_age INNER JOIN phone_brand_device_model2 ON gender_age.device_id = phone_brand_device_model2.device_id WHERE gender_age.gender = 'F' AND phone_brand_device_model2.device_model = 'MI 3'