mysql select query function on yii cactivedataprovider?

how to use select query with mysql function like count , max ,min

,DISTICT with CActivedataproviders

currently not working on my project.

i try this on my project query. it display data properly but

in query "COUNT(tour_code) as tot" is not any output display

not display info about (tot , tour_code) in query output.

Please help me in this issue.

Thanks

This post should solve your problem.

For more information on doing e.g. count, max, min queries with yii read the section Statistical Queries of the topic Working with Databases: Relational Active Record in the guide.