By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
version() |
---|
5.7.34 |
Variable_name | Value |
---|---|
sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'db_512655057.test.actions_u_user' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
n_brand | population | actions_u_user |
---|---|---|
pepsico | pepsicoeur | 1 |
pepsico | pepsicomex | 2 |
pepsico | pepsicousa | 1 |
pepsico | pepsicousa | 2 |
n_brand | population | actions_u_user |
---|---|---|
pepsico | pepsicoeur | 1 |
pepsico | pepsicomex | 2 |
pepsico | pepsicousa | 1 |
pepsico | pepsicousa | 2 |
n_brand | population | actions_u_user | sum_p |
---|---|---|---|
pepsico | pepsicoeur | 1 | 3 |
pepsico | pepsicomex | 2 | 2 |
pepsico | pepsicousa | 1 | 1 |
pepsico | pepsicousa | 2 | 4 |
Variable_name | Value |
---|---|
sql_mode | STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
n_brand | population | actions_u_user |
---|---|---|
pepsico | pepsicoeur | 1 |
pepsico | pepsicomex | 2 |
pepsico | pepsicousa | 1 |
Variable_name | Value |
---|---|
sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
The sum of all |
---|
14 |
The Brand | Population | The column name |
---|---|---|
ferrari | ferrarieur | 2 |
ferrari | ferrarimex | 2 |
ferrari | ferrariusa | 0 |
pepsico | pepsicoeur | 3 |
pepsico | pepsicomex | 2 |
pepsico | pepsicousa | 5 |
The Brand | Population | The column name |
---|---|---|
pepsico | pepsicoeur | 3 |
pepsico | pepsicomex | 2 |
pepsico | pepsicousa | 5 |