db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
computer_student | select cast(count(t1.course_id) as real) / count(distinct t2.p_id) as num from taughtby as t1 inner join person as t2 on t1.p_id = t2.p_id where t2.professor = 1 | Question: what is the average number of courses taught by a professor? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_... | what is the average number of courses taught by a professor? |
computer_student | select cast(sum(case when professor = 1 then 1 else 0 end) as real) * 100 / sum(case when student = 1 then 1 else 0 end) as per from person | Question: what is the ratio of professors and students? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_id, taughtBy.co... | what is the ratio of professors and students? |
computer_student | select cast(sum(case when courselevel = 'level_400' then 1 else 0 end) as real) * 100 / count(*) as per from course | Question: calculate the percentage of high-level undergraduate course. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_... | calculate the percentage of high-level undergraduate course. |
computer_student | select p_id from taughtby where course_id = 18 | Question: list down all the person ids who taught course id of 18. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_id, ... | list down all the person ids who taught course id of 18. |
computer_student | select t2.hasposition, t1.p_id_dummy from advisedby as t1 inner join person as t2 on t1.p_id_dummy = t2.p_id where t1.p_id = 303 | Question: provide the position status and ids of professor who advised student id '303'. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id... | provide the position status and ids of professor who advised student id '303'. |
computer_student | select t1.p_id, t3.courselevel from person as t1 inner join taughtby as t2 on t1.p_id = t2.p_id inner join course as t3 on t3.course_id = t2.course_id where t1.hasposition = 'faculty_aff' | Question: list the person ids and course levels of the affiliated professors in faculty. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id... | list the person ids and course levels of the affiliated professors in faculty. |
computer_student | select t2.yearsinprogram, t2.inphase from advisedby as t1 inner join person as t2 on t1.p_id = t2.p_id group by t1.p_id order by count(*) desc limit 1 | Question: describe the year in program and in phase status for the student with most number in advisor. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id,... | describe the year in program and in phase status for the student with most number in advisor. |
computer_student | select t1.p_id, t2.p_id from advisedby as t1 inner join person as t2 on t1.p_id_dummy = t2.p_id where hasposition = 'faculty_eme' | Question: list down the advised student ids and ids of employing professor in faculty. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_d... | list down the advised student ids and ids of employing professor in faculty. |
computer_student | select t1.course_id, t1.courselevel from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id where t2.p_id between 40 and 50 | Question: list the course ids and levels of person ids from 40 to 50. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_i... | list the course ids and levels of person ids from 40 to 50. |
computer_student | select t1.courselevel, t1.course_id from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id where t2.p_id = 141 | Question: describe the course level and list of person ids who taught course id of 147. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_... | describe the course level and list of person ids who taught course id of 147. |
computer_student | select t1.p_id, t3.courselevel from person as t1 inner join taughtby as t2 on t1.p_id = t2.p_id inner join course as t3 on t3.course_id = t2.course_id where t3.course_id = 104 and t1.hasposition <> 0 | Question: mention the person id of faculty professor who taught course id 104 and the course level. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, adv... | mention the person id of faculty professor who taught course id 104 and the course level. |
computer_student | select t1.p_id, t1.hasposition from person as t1 inner join taughtby as t2 on t1.p_id = t2.p_id inner join course as t3 on t3.course_id = t2.course_id where t3.courselevel = 'level_400' and t2.course_id < 10 | Question: find the professor id and position in faculty who taught high-level undergraduate course of less than 10 in id. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p... | find the professor id and position in faculty who taught high-level undergraduate course of less than 10 in id. |
computer_student | select t2.p_id from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id where t1.courselevel = 'level_300' and t1.course_id > 121 and t1.course_id < 130 | Question: list the professor id who taught the course id from 121 to 130 of basic undergraduate courses. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id... | list the professor id who taught the course id from 121 to 130 of basic undergraduate courses. |
computer_student | select t1.p_id_dummy, t2.hasposition from advisedby as t1 inner join person as t2 on t1.p_id = t2.p_id where t2.yearsinprogram = 'year_8' | Question: list the advisor ids for students with eighth year of program and position status in faculty of those professors. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy... | list the advisor ids for students with eighth year of program and position status in faculty of those professors. |
computer_student | select t1.course_id, t2.p_id from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id where t1.courselevel = 'level_500' limit 5 | Question: list any five of course ids with professor ids who taught master courses. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dumm... | list any five of course ids with professor ids who taught master courses. |
computer_student | select count(*) from advisedby where p_id_dummy = 415 | Question: how many students are under advisor 415? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_id, taughtBy.course_... | how many students are under advisor 415? |
computer_student | select count(*) from course where courselevel = 'level_500' | Question: how many professional or master/graduate courses are there? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_i... | how many professional or master/graduate courses are there? |
computer_student | select count(*) from person where hasposition = 0 and inphase = 0 | Question: how many non-faculty members are not undergoing the phase of qualifications? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_d... | how many non-faculty members are not undergoing the phase of qualifications? |
computer_student | select p_id from taughtby group by p_id order by count(course_id) asc limit 1 | Question: which professor taught the least amount of courses? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_id, taugh... | which professor taught the least amount of courses? |
computer_student | select count(*) from advisedby as t1 inner join person as t2 on t1.p_id = t2.p_id where t1.p_id_dummy = 5 and t2.student = 1 and t2.yearsinprogram = 'year_5' | Question: among the students being advised by advisor 5, how many students are in the 5th year? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advised... | among the students being advised by advisor 5, how many students are in the 5th year? |
computer_student | select t2.p_id from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id where t1.courselevel = 'level_500' group by t2.p_id order by count(t2.course_id) desc limit 1 | Question: which professor teaches the highest number of professional or master/graduate courses? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advise... | which professor teaches the highest number of professional or master/graduate courses? |
computer_student | select count(*) from person as t1 inner join taughtby as t2 on t1.p_id = t2.p_id inner join course as t3 on t3.course_id = t2.course_id where t1.hasposition = 'faculty_aff' and t1.professor = 1 and t3.courselevel = 'level_500' | Question: among the faculty affiliated professor, how many professors teaches professional or master/undergraduate courses? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy... | among the faculty affiliated professor, how many professors teaches professional or master/undergraduate courses? |
computer_student | select t2.p_id from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id where t1.courselevel = 'level_500' group by t2.p_id order by count(t2.p_id) desc limit 5 | Question: who are the top 5 professors who teaches the highest number of professional or master/undergraduate courses? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id... | who are the top 5 professors who teaches the highest number of professional or master/undergraduate courses? |
computer_student | select count(t1.p_id_dummy) from advisedby as t1 inner join person as t2 on t1.p_id = t2.p_id where t2.yearsinprogram = 'year_1' and t2.student = 1 | Question: how many advisors are in charge of advising all the students in 1st year? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dumm... | how many advisors are in charge of advising all the students in 1st year? |
computer_student | select count(*) from ( select count(t2.p_id) from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id where t1.courselevel = 'level_400' group by t2.p_id having count(distinct t1.course_id) <= 2 ) | Question: how many professors teaches no more than two high-level or harder undergraduate courses? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advi... | how many professors teaches no more than two high-level or harder undergraduate courses? |
computer_student | select count(*) from person as t1 inner join taughtby as t2 on t1.p_id = t2.p_id inner join course as t3 on t3.course_id = t2.course_id where t1.hasposition = 'faculty_eme' and t1.professor = 1 and t3.courselevel = 'level_400' | Question: between the faculty employee professors, how many teaches high-level or harder undergraduate courses? indicate each of the professors unique identifying number. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. ... | between the faculty employee professors, how many teaches high-level or harder undergraduate courses? indicate each of the professors unique identifying number. |
computer_student | select t1.hasposition from person as t1 inner join taughtby as t2 on t1.p_id = t2.p_id where t1.professor = 1 group by t1.p_id order by count(t2.course_id) desc limit 1 | Question: what is the position in the faculty of the professor who teaches the highest number of courses? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_i... | what is the position in the faculty of the professor who teaches the highest number of courses? |
computer_student | select t2.yearsinprogram from advisedby as t1 inner join person as t2 on t1.p_id = t2.p_id where t2.student = 1 group by t2.p_id having count(t2.p_id) > 2 | Question: what year in the program do the students with more than 2 advisors are in? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dum... | what year in the program do the students with more than 2 advisors are in? |
computer_student | select count(*) from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id where t1.courselevel = 'level_300' | Question: how many professors teaches basic or medium undergraduate courses? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = per... | how many professors teaches basic or medium undergraduate courses? |
computer_student | select t2.yearsinprogram from advisedby as t1 inner join person as t2 on t1.p_id = t2.p_id where t2.student = 1 group by t2.yearsinprogram order by count(t1.p_id_dummy) desc limit 1 | Question: among the students being advised by advisors, which students' year in the program do the advisors advise the majority of? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: a... | among the students being advised by advisors, which students' year in the program do the advisors advise the majority of? |
computer_student | select count(t1.p_id_dummy) from advisedby as t1 inner join person as t2 on t1.p_id = t2.p_id where t2.inphase = 'pre_quals' and t2.student = 1 | Question: how many students that are undergoing the pre-phase of qualification have advisors? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy... | how many students that are undergoing the pre-phase of qualification have advisors? |
computer_student | select cast(count(t1.course_id) as real) / count(distinct t2.p_id) from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id where t1.courselevel = 'level_500' | Question: what is the average number of professional or master/undergraduate courses being taught by each professor? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id =... | what is the average number of professional or master/undergraduate courses being taught by each professor? |
computer_student | select count(*) from ( select count(course_id) from taughtby group by course_id having count(course_id) > 4 ) | Question: how many courses were taught by more than 4 people? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_id, taugh... | how many courses were taught by more than 4 people? |
computer_student | select count(course_id) from course where courselevel = 'level_500' | Question: what is the total of professional courses available at the university? list out all the course id. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.... | what is the total of professional courses available at the university? list out all the course id. |
computer_student | select count(*) from person where yearsinprogram = 'year_1' or yearsinprogram = 'year_2' | Question: what is the sum of year 1 and year 2 students? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_id, taughtBy.c... | what is the sum of year 1 and year 2 students? |
computer_student | select count(*) from person as t1 inner join taughtby as t2 on t1.p_id = t2.p_id where t1.professor = 1 and t1.hasposition <> 0 | Question: how many courses were taught by a professor who is currently the member of faculty? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy... | how many courses were taught by a professor who is currently the member of faculty? |
computer_student | select t1.p_id, t1.hasposition from person as t1 inner join taughtby as t2 on t1.p_id = t2.p_id group by t1.p_id order by count(t2.course_id) desc limit 1 | Question: which professor taught the most courses and what is the position of this person in the university? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.... | which professor taught the most courses and what is the position of this person in the university? |
computer_student | select distinct t2.course_id from person as t1 inner join taughtby as t2 on t1.p_id = t2.p_id where t1.professor = 1 and t1.hasposition = 0 | Question: which courses were taught by a professor who is not a faculty member? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = ... | which courses were taught by a professor who is not a faculty member? |
computer_student | select t1.p_id, t3.courselevel from person as t1 inner join taughtby as t2 on t1.p_id = t2.p_id inner join course as t3 on t3.course_id = t2.course_id group by t1.p_id order by count(t2.course_id) desc limit 1 | Question: which member of the faculty are teaching the most courses and what is his/her general course level? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person... | which member of the faculty are teaching the most courses and what is his/her general course level? |
talkingdata | select device_id from gender_age where age = ( select max(age) from gender_age ) | Question: what is the device id of the oldest user? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relevant -> ev... | what is the device id of the oldest user? |
talkingdata | select count(event_id) from `events` where latitude = 40 and longitude = 97 | Question: how many events were held at coordinate 97,40? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relevant ... | how many events were held at coordinate 97,40? |
talkingdata | select count(gender) from gender_age where gender = 'm' and `group` = 'm32-38' | Question: how many male users are in the age group of m32-38? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_rele... | how many male users are in the age group of m32-38? |
talkingdata | select count(gender) from gender_age where age > 50 and gender = 'f' | Question: how many female users over the age of 50 are there? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_rele... | how many female users over the age of 50 are there? |
talkingdata | select count(is_active) from app_events where event_id = 2 and is_active = 1 | Question: how many active users were there in the event id 2? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_rele... | how many active users were there in the event id 2? |
talkingdata | select gender from gender_age where age = ( select min(age) from gender_age ) | Question: what is the gender of the youngest user? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relevant -> eve... | what is the gender of the youngest user? |
talkingdata | 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 | Question: what is the name of the category which most users belong to? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. ev... | what is the name of the category which most users belong to? |
talkingdata | select t1.device_model from phone_brand_device_model2 as t1 inner join gender_age as t2 on t2.device_id = t1.device_id order by t2.age desc limit 1 | Question: what is the model of the oldest user's device? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relevant ... | what is the model of the oldest user's device? |
talkingdata | select count(t1.app_id) from app_labels as t1 inner join label_categories as t2 on t2.label_id = t1.label_id where t2.category = 'home decoration' | Question: how many users are there in the home decoration category? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. event... | how many users are there in the home decoration category? |
talkingdata | select count(t3.gender) from app_events as t1 inner join events_relevant as t2 on t2.event_id = t1.event_id inner join gender_age as t3 on t3.device_id = t2.device_id where t1.is_active = 1 and t3.gender = 'm' and t2.timestamp like '2016-05-01%' | Question: how many male users are active in the events held on 5/1/2016? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. ... | how many male users are active in the events held on 5/1/2016? |
talkingdata | select count(t1.gender) from gender_age as t1 inner join phone_brand_device_model2 as t2 on t2.device_id = t1.device_id where t1.gender = 'f' and t2.device_model = 'zenfone 5' | Question: how many female users use zenfone 5 devices? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relevant ->... | how many female users use zenfone 5 devices? |
talkingdata | select t3.age from app_events as t1 inner join events_relevant as t2 on t1.event_id = t2.event_id inner join gender_age as t3 on t2.device_id = t3.device_id where t1.is_active = 1 and t2.longitude = 121 and t2.latitude = 31 and substr(t2.timestamp, 1, 10) = '2016-05-06' order by t3.age desc limit 1 | Question: what is the age of the oldest active user that participated in the event held on 5/6/2016 at coordinates 121, 31? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> ev... | what is the age of the oldest active user that participated in the event held on 5/6/2016 at coordinates 121, 31? |
talkingdata | select t2.device_model from gender_age as t1 inner join phone_brand_device_model2 as t2 on t1.device_id = t2.device_id where t1.`group` = 'f27-28' and t1.gender = 'f' order by t2.device_id desc limit 1 | Question: what is the most common device model among female users between the ages 27 to 28? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, l... | what is the most common device model among female users between the ages 27 to 28? |
talkingdata | select t4.category from events_relevant as t1 inner join app_events_relevant as t2 on t1.event_id = t2.event_id inner join app_labels as t3 on t3.app_id = t2.app_id inner join label_categories as t4 on t3.label_id = t4.label_id order by t1.timestamp limit 2 | Question: what are the categories of the top 2 oldest events? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_rele... | what are the categories of the top 2 oldest events? |
talkingdata | 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 | Question: what is the gender of the majority of vivo phone users? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_... | what is the gender of the majority of vivo phone users? |
talkingdata | 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 | Question: which category has the highest number of users? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relevant... | which category has the highest number of users? |
talkingdata | 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' | Question: how many users belong to the moba category? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relevant -> ... | how many users belong to the moba category? |
talkingdata | 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' | Question: what is the percentage of female oppo users against the male oppo users? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, ... | what is the percentage of female oppo users against the male oppo users? |
talkingdata | select longitude, latitude from `events` where substr(`timestamp`, 1, 10) = '2016-05-08' | Question: what were the locations of the events on 8th may, 2016? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_... | what were the locations of the events on 8th may, 2016? |
talkingdata | select app_id , iif(is_installed = 1, 'yes', 'no') as status from app_events where event_id = 844 | Question: list the app users ids and installed status for the event id of 844. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, lati... | list the app users ids and installed status for the event id of 844. |
talkingdata | select count(event_id) from events where substr(`timestamp`, 1, 10) = '2016-04-30' | Question: how many events were there on 30th april, 2016? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relevant... | how many events were there on 30th april, 2016? |
talkingdata | select count(device_id) from phone_brand_device_model2 where device_model = 'xplay3s' and phone_brand = 'vivo' | Question: how many users used vivo xplay3s model? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relevant -> even... | how many users used vivo xplay3s model? |
talkingdata | 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 | Question: what is the ratio of male and female users in 27-28 age group? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. ... | what is the ratio of male and female users in 27-28 age group? |
talkingdata | select label_id from label_categories where category in ('online shopping', 'online malls') | Question: what are the labels' ids of online shopping and online malls categories? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, ... | what are the labels' ids of online shopping and online malls categories? |
talkingdata | 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 | Question: describe the phone brands and models of the users who participated in events on 5th may, 2016 at the coordinates of (112,44). | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. ... | describe the phone brands and models of the users who participated in events on 5th may, 2016 at the coordinates of (112,44). |
talkingdata | 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 | Question: provide the app users ids and time for the event id of 82. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. even... | provide the app users ids and time for the event id of 82. |
talkingdata | 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 | Question: describe the device user gender and age of the event id of 15251. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitud... | describe the device user gender and age of the event id of 15251. |
talkingdata | 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 | Question: how many events did the 88-years-old male users participate on 4th may,2016? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitu... | how many events did the 88-years-old male users participate on 4th may,2016? |
talkingdata | 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 | Question: describe the ages, genders and numbers of events participated by the users at coordinates of (-102,38). | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, de... | describe the ages, genders and numbers of events participated by the users at coordinates of (-102,38). |
talkingdata | 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 | Question: provide the phone brands and models of the users who were at the coordinates of (80,44). | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timest... | provide the phone brands and models of the users who were at the coordinates of (80,44). |
talkingdata | 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 | Question: list the included categories in the event id of 155. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_rel... | list the included categories in the event id of 155. |
talkingdata | 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 | Question: among htc butterfly phone users, list any five devices' ids used by females. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitu... | among htc butterfly phone users, list any five devices' ids used by females. |
talkingdata | 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' | Question: how many app ids were included under science fiction category? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. ... | how many app ids were included under science fiction category? |
talkingdata | 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' | Question: what are the ages and genders of the lg l70 users? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relev... | what are the ages and genders of the lg l70 users? |
talkingdata | select sum(iif(t1.category = 'industry tag', 1, 0)) * 100 / count(t2.app_id) as per from label_categories as t1 inner join app_labels as t2 on t2.label_id = t1.label_id | Question: calculate the percentage of the app user ids under industry tag category. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude,... | calculate the percentage of the app user ids under industry tag category. |
talkingdata | select sum(iif(t1.device_model = 'nexus 5', 1, 0)) * 100 / count(t1.device_id) as per , sum(iif(t1.device_model = 'nexus 5' and t2.gender = 'm', 1, 0)) / sum(iif(t1.device_model = 'nexus 5' and t2.gender = 'f', 1, 0)) as r from phone_brand_device_model2 as t1 inner join gender_age as t2 on t2.device_id = t1.device_id w... | Question: among the lg brand users, calculate the percentage of the nexus 5 model user. what is the ratio of male and female users of it? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id... | among the lg brand users, calculate the percentage of the nexus 5 model user. what is the ratio of male and female users of it? |
talkingdata | select count(event_id) from app_events where event_id = 2 and is_active = 0 | Question: how many users of the app were not active when event no.2 happened? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latit... | how many users of the app were not active when event no.2 happened? |
talkingdata | select count(event_id) from `events` where substr(`timestamp`, 1, 4) = '2016' | Question: how many events in total have happened on the devices in 2016? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. ... | how many events in total have happened on the devices in 2016? |
talkingdata | select count(event_id) from `events` where substr(`timestamp`, 1, 4) = '2016' and device_id = 29182687948017100 | Question: how many events have happened on device no.29182687948017100 in 2016? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, lat... | how many events have happened on device no.29182687948017100 in 2016? |
talkingdata | select count(device_id) from gender_age where gender = 'm' | Question: how many device users are male? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relevant -> event_id, de... | how many device users are male? |
talkingdata | select max(age) from gender_age | Question: what is the age of the oldest device user? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relevant -> e... | what is the age of the oldest device user? |
talkingdata | select count(device_id) from gender_age where age < 30 and gender = 'f' | Question: among the female users of the devices, how many of them are under 30? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, lat... | among the female users of the devices, how many of them are under 30? |
talkingdata | select count(t1.device_id) from phone_brand_device_model2 as t1 inner join gender_age as t2 on t2.device_id = t1.device_id where t2.gender = 'f' and t1.device_model = 'galaxy note 2' | Question: among the users who use a galaxy note 2, how many of them are female? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, lat... | among the users who use a galaxy note 2, how many of them are female? |
talkingdata | select t2.age from phone_brand_device_model2 as t1 inner join gender_age as t2 on t2.device_id = t1.device_id where t1.device_model = 'galaxy note 2' | Question: please list the ages of all the users who use a galaxy note 2. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. ... | please list the ages of all the users who use a galaxy note 2. |
talkingdata | select device_model from phone_brand_device_model2 where device_id in ( select device_id from gender_age where age = ( select max(age) from gender_age ) ) | Question: what is the device model of the device used by the oldest user? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude.... | what is the device model of the device used by the oldest user? |
talkingdata | select t.`group` from ( select t2.`group`, count(`group`) 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.`group` ) as t order by t.num desc limit 1 | Question: to which user group do most of the users who uses a vivo device belong? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, l... | to which user group do most of the users who uses a vivo device belong? |
talkingdata | select count(t1.app_id) from app_labels as t1 inner join label_categories as t2 on t2.label_id = t1.label_id where t2.category = 'securities' | Question: how many app users belong to the category of securities? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events... | how many app users belong to the category of securities? |
talkingdata | 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 = 1977658975649780000 | Question: to which categories does app user no.1977658975649780000 belong? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude... | to which categories does app user no.1977658975649780000 belong? |
talkingdata | select distinct t1.category from label_categories as t1 inner join app_labels as t2 on t1.label_id = t2.label_id inner join app_events as t3 on t2.app_id = t3.app_id where t3.event_id = 2 and t3.is_active = 0 | Question: please list the categories of the app users who are not active when event no.2 happened. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timest... | please list the categories of the app users who are not active when event no.2 happened. |
talkingdata | select distinct t2.longitude, t2.latitude from app_events as t1 inner join events as t2 on t2.event_id = t1.event_id where t2.event_id = 2 and t1.is_active = 0 | Question: please list the location coordinates of all the devices with an inactive app user when event no.2 happened. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id... | please list the location coordinates of all the devices with an inactive app user when event no.2 happened. |
talkingdata | select t2.timestamp from app_events as t1 inner join events as t2 on t2.event_id = t1.event_id where t1.is_active = 0 and t2.event_id = 2 order by t2.timestamp limit 1 | Question: among all the times event no.2 happened when the app user was not active, when was the earliest time this situation happened? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. ... | among all the times event no.2 happened when the app user was not active, when was the earliest time this situation happened? |
talkingdata | select t2.event_id from phone_brand_device_model2 as t1 inner join events as t2 on t2.device_id = t1.device_id where t1.phone_brand = 'vivo' | Question: please list the ids of the events happened on all the vivo devices. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latit... | please list the ids of the events happened on all the vivo devices. |
talkingdata | select count(t1.device_id) from phone_brand_device_model2 as t1 inner join events as t2 on t2.device_id = t1.device_id where t1.phone_brand = 'vivo' and t2.event_id = 2 | Question: among the devices with event no.2 happening, how many of them are vivo devices? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, long... | among the devices with event no.2 happening, how many of them are vivo devices? |
talkingdata | select t1.timestamp from events as t1 inner join phone_brand_device_model2 as t2 on t1.event_id = t2.device_id where t2.phone_brand = 'vivo' and t1.event_id = '2' | Question: please list the time when event no.2 happened on a vivo device. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude.... | please list the time when event no.2 happened on a vivo device. |
talkingdata | 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' | Question: how many events in total have happened on all the vivo devices in the year 2016? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, lon... | how many events in total have happened on all the vivo devices in the year 2016? |
talkingdata | 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 | Question: among the users who uses a vivo device, how many of them are female and under 30? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, lo... | among the users who uses a vivo device, how many of them are female and under 30? |
talkingdata | 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 | Question: what is the category that the most app users belong to? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_... | what is the category that the most app users belong to? |
talkingdata | 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 ) | Question: what is the brand of the device used by the youngest female user? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitud... | what is the brand of the device used by the youngest female user? |
talkingdata | 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' | Question: how many users in user group m23-26 use a vivo device? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_r... | how many users in user group m23-26 use a vivo device? |
talkingdata | 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' | Question: among all the users who use a vivo device, what is the percentage of the users in the m23-26 user group? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, d... | among all the users who use a vivo device, what is the percentage of the users in the m23-26 user group? |
talkingdata | 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' | Question: among all the devices with event no.2 happening, what is the percentage of the device being a vivo phone? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, ... | among all the devices with event no.2 happening, what is the percentage of the device being a vivo phone? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.