
xavier alberto castillo varon
Preguntabuena como puedo solucionar este error
Error Code: 1140. In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column ‘prueba_library.a.nationality’; this is incompatible with sql_mode=only_full_group_by
este error me sala cuando ejecuto el siguiente query
select nationality, count(book_id),
sum(if(year <1950, 1, 0)) as ‘<1950’,
sum(if(year >=1950 and year <1990,1,0)) as ‘<1990’,
sum(if(year >=1990 and year <2001,1,0 )) as ‘<2001’,
sum(if(year >=2001,1,0)) as '<hoy’
from books as b
join authors as a
on a.author_id = b.author_id
where a.nationality is not null;