MySql I have some unical groups with 10+ lines with 2 same strings (date and ref) Mysql database:
id name qty ref weight date
1 name1 2 x1 22 2011-01-01
2 name2 3 x1 13 2011-01-01
3 name3 4 x2 10 2021-02-02
4 name4 5 x2 15 2021-02-02
Could you please help, how I can get only unical results and summ qty and weight of the groups, like that:
ref weight qty date
x1 35 5 2011-01-01
x2 25 9 2021-02-02
I tryed distinct, but in this case cant get sum.