Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GROUP BY in sqlite note working

I'm using GROUP BY in my sql query.

Query is :

SELECT _id, message_type, message_type_id FROM msgs_list GROUP BY message_type_id

This query is not doing the functionality of GROUP BY. **It is functioning like:

SELECT _id, message_type, message_type_id FROM msgs_list

The same query is working perfectly on windows machine, when i download the Data Base from device to the Windows machine.

Observed result:

enter image description here

expected Result :

enter image description here

Can any body suggest the possible solution.

Thanks,
Sha.

like image 220
sha Avatar asked Jul 31 '26 18:07

sha


1 Answers

As per my knowledge GROUP BY clause can be used with either "aggregate_function" or Having clause.

The GROUP BY Statement

like image 170
andy Avatar answered Aug 02 '26 10:08

andy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!