You can translate the question and the replies:

error in SQL

I am not getting desired results from below query group_concat(distinct product_type) *********************** e.g. if i have product_type cat, dog, cat Need to get cat,dog
user
26-10-2016 14:28:05 -0400
code

1 Answer

Hi, I tried using the group_concat function with ‘distinct’ and it worked for me. However, using distinct within the group_concat function only works when it is the only parameter used in the function. ie. this query will work: SELECT group_concat(distinct product_type) FROM view. But this query will not: SELECT group_concat(‘:’, distinct product_id) FROM view. If you would like to use the group_concat function with more parameters, I suggest using a subquery in the FROM clause. You can read about the syntax for the group_concat function in the Advanced VQL Guide under “GROUP_CONCAT”. Hope this helps!
Denodo Team
27-10-2016 12:53:12 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here