Ad

Friday, June 28, 2013

Android SQLite Commands with Group By and HAVING

 SELECT * from survey_answer_list_main





SELECT question_id,answer, count(answer)  from survey_answer_list_main where survey_id=1 AND type='single'  group by question_id,answer;

SELECT question_id,answer, count(answer)  from survey_answer_list_main where survey_id=1 AND type='single'  group by question_id,answer having answer LIKE '%yes%'



No comments:

Post a Comment