Hi, thanks for the answer @php_roccs,
Yes, I am receiving errors about the above subquery.
First, I don't want use $this->db->query();
Second, it is possible to do.
In this case, I want to make group by in some case, in $this->db->from(). The group by was success if I select 1 column, but more than 1 columns to be select, I got an error. The double quotes seem take in wrong place.