I have a datetime
-type column in MySQL. Now, in my report I want to use only the date part for
a. grouping
b. comparison
I tried looking for a solution on the net, however I couldn't find it.
How to use distinct
in the SQL query in report designer. If I design the following query
SELECT COUNT (DISTINCT user_id) FROM mytable
it converts the same to
SELECT DISTINCT COUNT (user_id) FROM mytable
Please help.
I never ran into such behavior, but, anyway, I think a quick (but not the best) workaround would be to use the following query:
select
count(0)
from
(select distinct user_id from mytable) t
Doesn't work in version 3.9.1 It keeps changing it to give priority to DISTINCT I will give it a go to use the summarisation functions of Report Designer itself.
Cheers
AC
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.