Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
BryceDahle
Contributor
Contributor

Changing the sql_mode field in Data Load Editor

Hello, I'm trying to get my data to look the same as it would be in MYSQL / DBeaver, but with the sql_mode always set to "only_full_group_by" I can't do this. I get duplicate records because it is grouping by one of the fields I don't want it to be grouping by. Is there any way to change sql_mode to be either blank or something that doesn't force all my fields to be in the GROUP BY? I only want to group by field1 but am forced to add fields 2-6 as well

Code for reference:

SELECT t1.field1

,t1.field2

,t2.field3

,t2.field4

,t2.field5

,COUNT(case t3.field6 when '0'then '0' ELSE null end)

,case t3.field6 when '0' then avg(DATEDIFF(CURRENT_DATE(), t3.DateTime_Added)) ELSE NULL end as 'date find'

FROM domain.table1 t1

INNER JOIN (select max(id) as id

from domain.table1 t1

WHERE 1=1

AND `type1` = 'filter'

GROUP BY identifier) t12 on t1.id = t12.id

INNER JOIN domain.table2 t2 on t2.fieldA = t1.fieldA

LEFT JOIN domain.table1 t3 on t3.fieldB = t1.fieldB

WHERE 1=1

AND t1.`type1` = 'filter'

AND t1.type2 = 'filter2'

AND 'date find' IS NOT NULL

AND t2.type3 NOT IN ('filter3', 'filter4')

GROUP BY t1.field1

Labels (1)
  • mysql

0 Replies